-
Notifications
You must be signed in to change notification settings - Fork 1
/
SHPB_WAVE_ANALYSIS.m
1651 lines (1384 loc) · 82.8 KB
/
SHPB_WAVE_ANALYSIS.m
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
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
classdef SHPB_WAVE_ANALYSIS < matlab.apps.AppBase
% Properties that correspond to app components
properties (Access = public)
SHPBWaveAnalysis matlab.ui.Figure
FileMenu matlab.ui.container.Menu
OpenMenu matlab.ui.container.Menu
ExitMenu matlab.ui.container.Menu
AboutMenu matlab.ui.container.Menu
EditMenu matlab.ui.container.Menu
LoadDefaultsMenu matlab.ui.container.Menu
TabGroup matlab.ui.container.TabGroup
ExperimentalResultsTab matlab.ui.container.Tab
EDGARMENDONCALabel matlab.ui.control.Label
STRESSCALCULATIONPanel matlab.ui.container.Panel
DensityExp matlab.ui.control.NumericEditField
Densitykgm3Label matlab.ui.control.Label
WaveSpeedExp matlab.ui.control.NumericEditField
WaveSpeedmsLabel matlab.ui.control.Label
ModulusExp matlab.ui.control.NumericEditField
ModulusNmm2opLabel matlab.ui.control.Label
CalculateStressButton matlab.ui.control.Button
STRAINCALCULATIONSPanel matlab.ui.container.Panel
CalculateStrainButton matlab.ui.control.Button
VSTransmitted matlab.ui.control.NumericEditField
VolagetoStrainFactorEditField_2Label matlab.ui.control.Label
DSTransmitted matlab.ui.control.NumericEditField
DistancetoSamplemmEditField_2Label matlab.ui.control.Label
TransmittedStrainGaugeDataLabel matlab.ui.control.Label
DSIncident matlab.ui.control.NumericEditField
DistancetoSamplemmEditFieldLabel matlab.ui.control.Label
VSIncident matlab.ui.control.NumericEditField
VolagetoStrainFactorEditFieldLabel matlab.ui.control.Label
IncidentStrainGaugeDataLabel matlab.ui.control.Label
GraphAxesInputsPanel matlab.ui.container.Panel
ReflectedBarDataY matlab.ui.control.DropDown
ReflectedBarDataYDropDownLabel matlab.ui.control.Label
TransmittedBarDataY matlab.ui.control.DropDown
TransmittedBarDataYDropDownLabel matlab.ui.control.Label
IncidentBarDataY matlab.ui.control.DropDown
IncidentBarDataYDropDownLabel matlab.ui.control.Label
TimeDataX matlab.ui.control.DropDown
TimeDataXDropDownLabel matlab.ui.control.Label
UIstressstrainexp matlab.ui.control.UIAxes
UIstressexp matlab.ui.control.UIAxes
UItransmittedstrain matlab.ui.control.UIAxes
UIreflectedstrain matlab.ui.control.UIAxes
UIincidentstrain matlab.ui.control.UIAxes
UITransmittedV matlab.ui.control.UIAxes
UIReflectedV matlab.ui.control.UIAxes
UIIncidentV matlab.ui.control.UIAxes
TheoreticalResultsTab matlab.ui.container.Tab
EDGARMENDONCALabel_2 matlab.ui.control.Label
OUTPUTSPanel matlab.ui.container.Panel
MaxTrueStress matlab.ui.control.NumericEditField
MaxTrueStressNmm2EditFieldLabel matlab.ui.control.Label
MaxTrueStrain matlab.ui.control.NumericEditField
MaxTrueStrainEditFieldLabel matlab.ui.control.Label
MaximumStrain matlab.ui.control.NumericEditField
MaximumStrainEditFieldLabel matlab.ui.control.Label
MaximumStrainRate matlab.ui.control.NumericEditField
MaximumStrainRates1Label matlab.ui.control.Label
MaximumStress matlab.ui.control.NumericEditField
MaximumStressNmm2EditFieldLabel matlab.ui.control.Label
SPECIMENANDBARINPUTSPanel matlab.ui.container.Panel
WaveSpeedTheory matlab.ui.control.NumericEditField
WaveSpeedmsEditFieldLabel matlab.ui.control.Label
CalculateTheoreticalResults matlab.ui.control.Button
AoB matlab.ui.control.NumericEditField
AreaofBarmm2Label matlab.ui.control.Label
AoS matlab.ui.control.NumericEditField
AreaofSpecimenmm2Label matlab.ui.control.Label
LoS matlab.ui.control.NumericEditField
LenghtofSpecimenmmLabel matlab.ui.control.Label
ModulusTheory matlab.ui.control.NumericEditField
ModulusofBarNmm2Label matlab.ui.control.Label
UINominalStrainRate matlab.ui.control.UIAxes
UITrueStressStrain matlab.ui.control.UIAxes
UINominalStressStrain matlab.ui.control.UIAxes
UITrueStress matlab.ui.control.UIAxes
UITrueStrain matlab.ui.control.UIAxes
UINominalStress matlab.ui.control.UIAxes
UINominalStrain matlab.ui.control.UIAxes
UIMeanNominalAxialStress matlab.ui.control.UIAxes
UIMeanAxialStrainRate matlab.ui.control.UIAxes
WaveAnalysis1Tab matlab.ui.container.Tab
EDGARMENDONCALabel_5 matlab.ui.control.Label
OUTPUTSWAVEANALYSIS1Panel matlab.ui.container.Panel
Displacement3W matlab.ui.control.NumericEditField
Displacement3WmEditFieldLabel matlab.ui.control.Label
Displacement1W matlab.ui.control.NumericEditField
Displacement1WmEditFieldLabel matlab.ui.control.Label
Velocity3W matlab.ui.control.NumericEditField
Velocity3WmsEditFieldLabel matlab.ui.control.Label
Velocity1W matlab.ui.control.NumericEditField
Velocity1WmsEditFieldLabel matlab.ui.control.Label
Force3W matlab.ui.control.NumericEditField
Force3WNEditFieldLabel matlab.ui.control.Label
INPUTSWAVEANALYSISPanel matlab.ui.container.Panel
TimePeriod matlab.ui.control.NumericEditField
TimePeriodtsLabel matlab.ui.control.Label
CALCULATEWAVEANALYSISOP matlab.ui.control.Button
CTransmittedBar matlab.ui.control.NumericEditField
CTransmittedBarmsLabel matlab.ui.control.Label
CIncidentBar matlab.ui.control.NumericEditField
CIncidentBarmsEditFieldLabel matlab.ui.control.Label
ModulusofTransmittedBar matlab.ui.control.NumericEditField
ModulusofTransmittedBarNmm2Label matlab.ui.control.Label
AreaofTransmittedBar matlab.ui.control.NumericEditField
AreaofTransmittedBarmm2Label matlab.ui.control.Label
AreaofIncidentBar matlab.ui.control.NumericEditField
AreaofIncidentBarmm2Label matlab.ui.control.Label
ModulusofIncidentBar matlab.ui.control.NumericEditField
ModulusofIncidentBarNmm2Label matlab.ui.control.Label
LengthofSpecimenWA matlab.ui.control.NumericEditField
LengthoftheSpecimenmmLabel matlab.ui.control.Label
AreaofSpecimenWA matlab.ui.control.NumericEditField
AreaoftheSpecimenmm2Label matlab.ui.control.Label
UIDisplacementAnalysis matlab.ui.control.UIAxes
UIDisplacement3Wave matlab.ui.control.UIAxes
UIDisplacement1Wave matlab.ui.control.UIAxes
UIVelocityAnalysis matlab.ui.control.UIAxes
UIVelocity3Wave matlab.ui.control.UIAxes
UIVelocity1Wave matlab.ui.control.UIAxes
UIForce3Wave matlab.ui.control.UIAxes
UIForceTB matlab.ui.control.UIAxes
UIForceIB matlab.ui.control.UIAxes
WaveAnalysis2Tab matlab.ui.container.Tab
EDGARMENDONCALabel_3 matlab.ui.control.Label
OUTPUTSSTRAINRATESs1Panel matlab.ui.container.Panel
ThreeWStrainRate matlab.ui.control.NumericEditField
WEditFieldLabel_2 matlab.ui.control.Label
OneWStrainRate matlab.ui.control.NumericEditField
WEditFieldLabel matlab.ui.control.Label
OUTPUTSWAVEANALYSIS2Panel matlab.ui.container.Panel
TrueStrainMaxEditField matlab.ui.control.NumericEditField
TrueStrainMaxEditFieldLabel matlab.ui.control.Label
TrueStressMaxEditField matlab.ui.control.NumericEditField
TrueStressMaxEditFieldLabel matlab.ui.control.Label
MaxStrainEditField matlab.ui.control.NumericEditField
MaxStrainEditFieldLabel matlab.ui.control.Label
MaxStressEditField matlab.ui.control.NumericEditField
MaxStressEditFieldLabel matlab.ui.control.Label
MaxForceEditField matlab.ui.control.NumericEditField
MaxForceEditFieldLabel matlab.ui.control.Label
UICompressiveStrainTime matlab.ui.control.UIAxes
UICompressiveStressTime matlab.ui.control.UIAxes
UITrueStressStrain3W matlab.ui.control.UIAxes
UICompressiveStrainRate matlab.ui.control.UIAxes
UICompressiveStressStrain matlab.ui.control.UIAxes
UIForceDisplacement matlab.ui.control.UIAxes
DocumentationTab matlab.ui.container.Tab
EDGARMENDONCALabel_4 matlab.ui.control.Label
Hyperlink4 matlab.ui.control.Hyperlink
LINKSLabel matlab.ui.control.Label
Hyperlink3 matlab.ui.control.Hyperlink
Hyperlink2 matlab.ui.control.Hyperlink
Hyperlink matlab.ui.control.Hyperlink
end
properties (Access = private)
t % Description
end
% Callbacks that handle component events
methods (Access = private)
% Close request function: SHPBWaveAnalysis
function SHPBWaveAnalysisCloseRequest(app, event)
delete(app)
end
% Menu selected function: ExitMenu
function ExitMenuSelected(app, event)
delete(app)
end
% Menu selected function: OpenMenu
function OpenMenuSelected(app, event)
[file, path] = uigetfile('*.xlsx; *.csv');
if isequal(file,0)
msgbox('Please input a spreadsheet file','Error','error');
else
app.t = readtable(fullfile(path, file));
app.TimeDataX.Items = app.t.Properties.VariableNames;
app.IncidentBarDataY.Items = app.t.Properties.VariableNames;
app.ReflectedBarDataY.Items = app.t.Properties.VariableNames;
app.TransmittedBarDataY.Items = app.t.Properties.VariableNames;
plot(app.UIIncidentV, app.t.(app.TimeDataX.Value), app.t.(app.IncidentBarDataY.Value));
plot(app.UIReflectedV, app.t.(app.TimeDataX.Value), app.t.(app.ReflectedBarDataY.Value));
plot(app.UITransmittedV, app.t.(app.TimeDataX.Value), app.t.(app.TransmittedBarDataY.Value));
end
end
% Value changed function: TimeDataX
function TimeDataXValueChanged(app, event)
value = app.TimeDataX.Value;
end
% Value changed function: IncidentBarDataY
function IncidentBarDataYValueChanged(app, event)
value = app.IncidentBarDataY.Value;
plot(app.UIIncidentV, app.t.(app.TimeDataX.Value), app.t.(app.IncidentBarDataY.Value));
end
% Value changed function: ReflectedBarDataY
function ReflectedBarDataYValueChanged(app, event)
value = app.ReflectedBarDataY.Value;
plot(app.UIReflectedV, app.t.(app.TimeDataX.Value), app.t.(app.ReflectedBarDataY.Value));
end
% Value changed function: TransmittedBarDataY
function TransmittedBarDataYValueChanged(app, event)
value = app.TransmittedBarDataY.Value;
plot(app.UITransmittedV, app.t.(app.TimeDataX.Value), app.t.(app.TransmittedBarDataY.Value));
end
% Callback function
function CalStrainButtonPushed(app, event)
%%%%%%%%%%%%%%%%%%%%%%%
end
% Callback function
function CalculateStressButtonPushed(app, event)
%%%%%%%%%%%%%%%%%%%%%%%%
end
% Button pushed function: CalculateStrainButton
function CalculateStrainButtonPushed(app, event)
%Voltage to Stain Factor
VSI = app.VSIncident.Value;
VST = app.VSTransmitted.Value;
%Strains Experimental
IStrain = VSI*app.t.(app.IncidentBarDataY.Value);
RStrain = VSI*app.t.(app.ReflectedBarDataY.Value);
TStrain = VST*app.t.(app.TransmittedBarDataY.Value);
%Starin Plots
plot(app.UIincidentstrain, app.t.(app.TimeDataX.Value), IStrain);
plot(app.UIreflectedstrain, app.t.(app.TimeDataX.Value), RStrain);
plot(app.UItransmittedstrain, app.t.(app.TimeDataX.Value), TStrain);
end
% Button pushed function: CalculateStressButton
function CalculateStressButtonPushed2(app, event)
%Transmitted Voltage and Strain
VST = app.VSTransmitted.Value;
TStrain = VST*app.t.(app.TransmittedBarDataY.Value);
%Inputs Wave Speed and Density
C = app.WaveSpeedExp.Value;
D = app.DensityExp.Value;
app.WaveSpeedTheory.Value = C;
app.CIncidentBar.Value = C;
app.CTransmittedBar.Value = C;
%Output Young's Modulus
app.ModulusExp.Value = (C*C*D)/(1e6);
E=app.ModulusExp.Value;
app.ModulusTheory.Value = E;
app.ModulusofIncidentBar.Value = E;
app.ModulusofTransmittedBar.Value = E;
%Transmitted Strain
TStress = E*TStrain;
%Stress Time Plot
plot(app.UIstressexp, app.t.(app.TimeDataX.Value), TStress);
%Experimental Stress Strain Plot
plot(app.UIstressstrainexp, TStrain, TStress);
end
% Button pushed function: CalculateTheoreticalResults
function CalculateTheoreticalResultsButtonPushed(app, event)
%Voltage to Strain Factor
VSI = app.VSIncident.Value;
VST = app.VSTransmitted.Value;
%Strains
IStrain = VSI*app.t.(app.IncidentBarDataY.Value);
RStrain = VSI*app.t.(app.ReflectedBarDataY.Value);
TStrain = VST*app.t.(app.TransmittedBarDataY.Value);
%Inputs
lo = app.LoS.Value; %mm
Eb = app.ModulusTheory.Value; %N/mm2
Ab = app.AoB.Value; %mm2
As = app.AoS.Value; %mm2
Cb = app.WaveSpeedTheory.Value; %m/s
app.AreaofIncidentBar.Value = Ab;
app.AreaofTransmittedBar.Value = Ab;
app.AreaofSpecimenWA.Value = As;
app.LengthofSpecimenWA.Value = lo;
%Particle Velocity at input and output
v1 = (Cb*1e3)*(IStrain - RStrain); %mm/s
v2 = (Cb*1e3)*(TStrain); %mm/s
%Mean axial strain rate
es = (v1-v2)/lo;
esp = es/100;
plot(app.UIMeanAxialStrainRate, app.t.(app.TimeDataX.Value), es);
%Normal Forces at the specimen bar interface
P1 = (Eb*Ab)*(IStrain + RStrain);
P2 = (Eb*Ab)*(TStrain);
%Mean Nominal Axial Stress
SP1 = P1/(2*As);
SP2 = P2/(2*As);
Ss = SP1 + SP2;
plot(app.UIMeanNominalAxialStress, app.t.(app.TimeDataX.Value), Ss);
%Mean Stress Strain Plot
%plot(app.UIMeanStressStrain, esp, Ss)
%Nominal Strain Rate
esr = (2*Cb*1e3*RStrain)/lo;
app.MaximumStrainRate.Value = max(esr);
plot(app.UINominalStrainRate, app.t.(app.TimeDataX.Value), esr);
%Nominal Strain
time = app.t.(app.TimeDataX.Value);
nstrain = cumtrapz(time, esr);
app.MaximumStrain.Value = max(nstrain);
plot(app.UINominalStrain, time, nstrain);
%Nominal Stress
nstress = ((Eb*Ab)/As)*TStrain;
app.MaximumStress.Value = max(nstress);
plot(app.UINominalStress, time, nstress);
%Nominal Stress-Strain Plot
plot(app.UICompressiveStressTime, time, nstress);
plot(app.UICompressiveStrainTime, time, nstrain);
plot(app.UINominalStressStrain, nstrain, nstress);
%True Strain
truestrain = -log(1-nstrain);
plot(app.UITrueStrain, time, truestrain);
app.MaxTrueStrain.Value = max(truestrain);
%True Stress
truestress = nstress.*(1-nstrain);
plot(app.UITrueStress, time, truestress);
app.MaxTrueStress.Value = max(truestress);
%True Stress Strain
plot(app.UITrueStressStrain, truestrain, truestress);
end
% Button pushed function: CALCULATEWAVEANALYSISOP
function CALCULATEWAVEANALYSISOPButtonPushed(app, event)
%VOLTAGES
VSI = app.VSIncident.Value;
VST = app.VSTransmitted.Value;
%Strains
IStrain = VSI*app.t.(app.IncidentBarDataY.Value);
RStrain = VSI*app.t.(app.ReflectedBarDataY.Value);
TStrain = VST*app.t.(app.TransmittedBarDataY.Value);
%TIME
time = app.t.(app.TimeDataX.Value)
%WAVE ANALYSIS INPUTS
AI = app.AreaofIncidentBar.Value; %mm2
EI = app.ModulusofIncidentBar.Value; %N/mm2
AT = app.AreaofTransmittedBar.Value; %mm2
ET = app.ModulusofTransmittedBar.Value; %N/mm2
CI = app.CIncidentBar.Value; %m/s
CT = app.CTransmittedBar.Value; %m/s
LoSpecimen = app.LengthofSpecimenWA.Value; %mm
AoSpecimen = app.AreaofSpecimenWA.Value; %mm2
delt = app.TimePeriod.Value; %s
%FORCE CALCULATIONS
F1 = (AI*EI)*(IStrain + RStrain); %Incident Force
F2 = (AT*ET)*(TStrain); %Transmitted Force
plot(app.UIForceIB, time, F1);
plot(app.UIForceTB, time, F2);
%FORCE 3-WAVE ANALYSIS AVERAGE
F3w = (F1 + F2)/2;
plot(app.UIForce3Wave,time, F3w);
app.Force3W.Value = max(F3w);
%VELOCITY CALCULATIONS
%One Wave Analysis - Velocity
v1 = 2*CI*RStrain*(1e3);
plot(app.UIVelocity1Wave, time, v1);
app.Velocity1W.Value = max(v1);
%Three Wave Analysis - Velocity
v3 = ((CI*1e3)*(IStrain + RStrain)) - ((CT*1e3)*TStrain);
plot(app.UIVelocity3Wave, time, v3);
app.Velocity3W.Value = max(v3);
% Velocity - Wave Comparison
plot(app.UIVelocityAnalysis, time, v1);
hold(app.UIVelocityAnalysis, "on");
plot(app.UIVelocityAnalysis, time, v3);
hold(app.UIVelocityAnalysis, "off");
%DISPLACEMENT ANALYSIS
%One Wave Analysis - Displacement
u1 = cumtrapz(time, RStrain);
u1Wave = 2*CI*u1*(1e3);
plot(app.UIDisplacement1Wave, time, u1Wave);
app.Displacement1W.Value = max(u1);
%Three Wave Analysis - Displacement
u3 = cumtrapz(time, v3);
u3Wave = 2*delt*u3*(1e3);
plot(app.UIDisplacement3Wave, time, u3Wave);
app.Displacement3W.Value = max(u3);
%Displacement Wave Comparison
plot(app.UIDisplacementAnalysis, time, u1Wave);
hold(app.UIDisplacementAnalysis, "on");
plot(app.UIDisplacementAnalysis, time, u3Wave);
hold(app.UIDisplacementAnalysis, "off");
%Force Displacement Plot
plot(app.UIForceDisplacement, u3Wave, F3w);
%Strain Calulated
strain3W = u3Wave/(2*LoSpecimen);
%Stress Calculated
stress3W = F3w/AoSpecimen;
%Stress-Strain Calculated Plot
plot(app.UICompressiveStressStrain, strain3W, stress3W);
%Outputs Wave Analysis
app.MaxForceEditField.Value = max(F3w);
app.MaxStressEditField.Value = max(stress3W);
app.MaxStrainEditField.Value = max(strain3W);
%True Strain Calculated
truestrain3W = -log(1-strain3W);
app.TrueStrainMaxEditField.Value = max(truestrain3W);
%True Stress Calculated
truestress3W = stress3W.*(1-strain3W);
app.TrueStressMaxEditField.Value = max(truestress3W);
%True Stress-Strain Calculated Plot
plot(app.UITrueStressStrain3W, truestrain3W, truestress3W);
%Strain Rate Calculated
strainrate1W = (2*CI.*RStrain)/(LoSpecimen*1e-3);
plot(app.UICompressiveStrainRate, time, strainrate1W);
hold(app.UICompressiveStrainRate, "on");
strainrate3W = (((CI)*(IStrain + RStrain)) - ((CT)*TStrain))/(LoSpecimen*1e-3);
plot(app.UICompressiveStrainRate, time, strainrate3W);
hold(app.UICompressiveStrainRate, "off");
%Output Strain Rates
app.OneWStrainRate.Value = max(strainrate1W);
app.ThreeWStrainRate.Value = max(strainrate3W);
end
% Menu selected function: AboutMenu
function AboutMenuSelected(app, event)
msgbox({'Last updated:14/01/2022';'Total versions:4'; '©Edgar Mendonca(2022)'});
end
% Menu selected function: LoadDefaultsMenu
function LoadDefaultsMenuSelected(app, event)
app.VSIncident.Value = 3.845e-5;
app.VSTransmitted.Value = 3.845e-5;
app.WaveSpeedExp.Value= 5000;
app.DensityExp.Value = 8000;
app.LoS.Value = 3;
app.AoS.Value = 255;
app.AoB.Value = 314;
app.AreaofIncidentBar.Value = app.AoB.Value;
app.AreaofTransmittedBar.Value = app.AoB.Value;
app.ModulusofIncidentBar.Value = app.ModulusExp.Value;
app.ModulusofTransmittedBar.Value = app.ModulusExp.Value;
app.LengthofSpecimenWA.Value = app.LoS.Value;
app.AreaofSpecimenWA.Value = app.AoS.Value;
end
end
% Component initialization
methods (Access = private)
% Create UIFigure and components
function createComponents(app)
% Create SHPBWaveAnalysis and hide until all components are created
app.SHPBWaveAnalysis = uifigure('Visible', 'off');
app.SHPBWaveAnalysis.Position = [100 100 1263 656];
app.SHPBWaveAnalysis.Name = 'SHPB_WAVE_ANALYSIS';
app.SHPBWaveAnalysis.Resize = 'off';
app.SHPBWaveAnalysis.CloseRequestFcn = createCallbackFcn(app, @SHPBWaveAnalysisCloseRequest, true);
% Create FileMenu
app.FileMenu = uimenu(app.SHPBWaveAnalysis);
app.FileMenu.Text = 'File';
% Create OpenMenu
app.OpenMenu = uimenu(app.FileMenu);
app.OpenMenu.MenuSelectedFcn = createCallbackFcn(app, @OpenMenuSelected, true);
app.OpenMenu.Text = 'Open';
% Create ExitMenu
app.ExitMenu = uimenu(app.FileMenu);
app.ExitMenu.MenuSelectedFcn = createCallbackFcn(app, @ExitMenuSelected, true);
app.ExitMenu.Text = 'Exit';
% Create AboutMenu
app.AboutMenu = uimenu(app.FileMenu);
app.AboutMenu.MenuSelectedFcn = createCallbackFcn(app, @AboutMenuSelected, true);
app.AboutMenu.Text = 'About';
% Create EditMenu
app.EditMenu = uimenu(app.SHPBWaveAnalysis);
app.EditMenu.Text = 'Edit';
% Create LoadDefaultsMenu
app.LoadDefaultsMenu = uimenu(app.EditMenu);
app.LoadDefaultsMenu.MenuSelectedFcn = createCallbackFcn(app, @LoadDefaultsMenuSelected, true);
app.LoadDefaultsMenu.Text = 'Load Defaults';
% Create TabGroup
app.TabGroup = uitabgroup(app.SHPBWaveAnalysis);
app.TabGroup.Position = [1 11 1246 646];
% Create ExperimentalResultsTab
app.ExperimentalResultsTab = uitab(app.TabGroup);
app.ExperimentalResultsTab.Title = 'Experimental Results';
app.ExperimentalResultsTab.BackgroundColor = [0.902 0.902 0.902];
% Create UIIncidentV
app.UIIncidentV = uiaxes(app.ExperimentalResultsTab);
title(app.UIIncidentV, 'Incident Voltage')
xlabel(app.UIIncidentV, 'Time')
ylabel(app.UIIncidentV, 'Incident Voltage')
app.UIIncidentV.PlotBoxAspectRatio = [1.96124031007752 1 1];
app.UIIncidentV.FontWeight = 'bold';
app.UIIncidentV.Position = [283 428 300 185];
% Create UIReflectedV
app.UIReflectedV = uiaxes(app.ExperimentalResultsTab);
title(app.UIReflectedV, 'Reflected Voltage')
xlabel(app.UIReflectedV, 'Time')
ylabel(app.UIReflectedV, 'Reflected Voltage')
app.UIReflectedV.PlotBoxAspectRatio = [1.94615384615385 1 1];
app.UIReflectedV.FontWeight = 'bold';
app.UIReflectedV.Position = [607 433 300 185];
% Create UITransmittedV
app.UITransmittedV = uiaxes(app.ExperimentalResultsTab);
title(app.UITransmittedV, 'Transmitted Voltage')
xlabel(app.UITransmittedV, 'Time')
ylabel(app.UITransmittedV, 'Trasmitted Voltage')
app.UITransmittedV.PlotBoxAspectRatio = [1.96850393700787 1 1];
app.UITransmittedV.FontWeight = 'bold';
app.UITransmittedV.Position = [931 443 300 185];
% Create UIincidentstrain
app.UIincidentstrain = uiaxes(app.ExperimentalResultsTab);
title(app.UIincidentstrain, 'Incident Strain')
xlabel(app.UIincidentstrain, 'Time')
ylabel(app.UIincidentstrain, 'Incident Strain')
app.UIincidentstrain.PlotBoxAspectRatio = [1.94615384615385 1 1];
app.UIincidentstrain.FontWeight = 'bold';
app.UIincidentstrain.Position = [283 232 300 185];
% Create UIreflectedstrain
app.UIreflectedstrain = uiaxes(app.ExperimentalResultsTab);
title(app.UIreflectedstrain, 'Reflected Strain')
xlabel(app.UIreflectedstrain, 'Time')
ylabel(app.UIreflectedstrain, 'Reflected Strain')
app.UIreflectedstrain.PlotBoxAspectRatio = [1.94615384615385 1 1];
app.UIreflectedstrain.FontWeight = 'bold';
app.UIreflectedstrain.Position = [606 232 300 185];
% Create UItransmittedstrain
app.UItransmittedstrain = uiaxes(app.ExperimentalResultsTab);
title(app.UItransmittedstrain, 'Transmitted Strain')
xlabel(app.UItransmittedstrain, 'Time')
ylabel(app.UItransmittedstrain, 'Transmitted Strain')
app.UItransmittedstrain.PlotBoxAspectRatio = [1.94615384615385 1 1];
app.UItransmittedstrain.FontWeight = 'bold';
app.UItransmittedstrain.Position = [931 228 300 185];
% Create UIstressexp
app.UIstressexp = uiaxes(app.ExperimentalResultsTab);
title(app.UIstressexp, 'Stress (Experimental)')
xlabel(app.UIstressexp, 'Time')
ylabel(app.UIstressexp, 'Stress')
app.UIstressexp.PlotBoxAspectRatio = [1.94615384615385 1 1];
app.UIstressexp.FontWeight = 'bold';
app.UIstressexp.Position = [283 22 300 185];
% Create UIstressstrainexp
app.UIstressstrainexp = uiaxes(app.ExperimentalResultsTab);
title(app.UIstressstrainexp, 'Stress - Strain')
xlabel(app.UIstressstrainexp, 'Strain')
ylabel(app.UIstressstrainexp, 'Stress')
app.UIstressstrainexp.FontWeight = 'bold';
app.UIstressstrainexp.Position = [607 22 300 185];
% Create GraphAxesInputsPanel
app.GraphAxesInputsPanel = uipanel(app.ExperimentalResultsTab);
app.GraphAxesInputsPanel.Title = 'Graph Axes Inputs';
app.GraphAxesInputsPanel.BackgroundColor = [0.9412 0.9412 0.9412];
app.GraphAxesInputsPanel.FontWeight = 'bold';
app.GraphAxesInputsPanel.Position = [10 477 230 145];
% Create TimeDataXDropDownLabel
app.TimeDataXDropDownLabel = uilabel(app.GraphAxesInputsPanel);
app.TimeDataXDropDownLabel.HorizontalAlignment = 'right';
app.TimeDataXDropDownLabel.FontSize = 10;
app.TimeDataXDropDownLabel.FontWeight = 'bold';
app.TimeDataXDropDownLabel.Position = [55 98 69 22];
app.TimeDataXDropDownLabel.Text = 'Time Data (X)';
% Create TimeDataX
app.TimeDataX = uidropdown(app.GraphAxesInputsPanel);
app.TimeDataX.ValueChangedFcn = createCallbackFcn(app, @TimeDataXValueChanged, true);
app.TimeDataX.FontSize = 10;
app.TimeDataX.FontWeight = 'bold';
app.TimeDataX.Position = [139 98 79 22];
% Create IncidentBarDataYDropDownLabel
app.IncidentBarDataYDropDownLabel = uilabel(app.GraphAxesInputsPanel);
app.IncidentBarDataYDropDownLabel.HorizontalAlignment = 'right';
app.IncidentBarDataYDropDownLabel.FontSize = 10;
app.IncidentBarDataYDropDownLabel.FontWeight = 'bold';
app.IncidentBarDataYDropDownLabel.Position = [20 66 104 22];
app.IncidentBarDataYDropDownLabel.Text = 'Incident Bar Data (Y)';
% Create IncidentBarDataY
app.IncidentBarDataY = uidropdown(app.GraphAxesInputsPanel);
app.IncidentBarDataY.ValueChangedFcn = createCallbackFcn(app, @IncidentBarDataYValueChanged, true);
app.IncidentBarDataY.FontSize = 10;
app.IncidentBarDataY.FontWeight = 'bold';
app.IncidentBarDataY.Position = [139 66 79 22];
% Create TransmittedBarDataYDropDownLabel
app.TransmittedBarDataYDropDownLabel = uilabel(app.GraphAxesInputsPanel);
app.TransmittedBarDataYDropDownLabel.HorizontalAlignment = 'right';
app.TransmittedBarDataYDropDownLabel.FontSize = 10;
app.TransmittedBarDataYDropDownLabel.FontWeight = 'bold';
app.TransmittedBarDataYDropDownLabel.Position = [1 2 122 22];
app.TransmittedBarDataYDropDownLabel.Text = {'Transmitted Bar Data (Y)'; ''};
% Create TransmittedBarDataY
app.TransmittedBarDataY = uidropdown(app.GraphAxesInputsPanel);
app.TransmittedBarDataY.ValueChangedFcn = createCallbackFcn(app, @TransmittedBarDataYValueChanged, true);
app.TransmittedBarDataY.FontSize = 10;
app.TransmittedBarDataY.FontWeight = 'bold';
app.TransmittedBarDataY.Position = [138 2 80 22];
% Create ReflectedBarDataYDropDownLabel
app.ReflectedBarDataYDropDownLabel = uilabel(app.GraphAxesInputsPanel);
app.ReflectedBarDataYDropDownLabel.HorizontalAlignment = 'right';
app.ReflectedBarDataYDropDownLabel.FontSize = 10;
app.ReflectedBarDataYDropDownLabel.FontWeight = 'bold';
app.ReflectedBarDataYDropDownLabel.Position = [13 34 111 22];
app.ReflectedBarDataYDropDownLabel.Text = 'Reflected Bar Data (Y)';
% Create ReflectedBarDataY
app.ReflectedBarDataY = uidropdown(app.GraphAxesInputsPanel);
app.ReflectedBarDataY.ValueChangedFcn = createCallbackFcn(app, @ReflectedBarDataYValueChanged, true);
app.ReflectedBarDataY.FontSize = 10;
app.ReflectedBarDataY.FontWeight = 'bold';
app.ReflectedBarDataY.Position = [139 34 79 22];
% Create STRAINCALCULATIONSPanel
app.STRAINCALCULATIONSPanel = uipanel(app.ExperimentalResultsTab);
app.STRAINCALCULATIONSPanel.Title = 'STRAIN CALCULATIONS';
app.STRAINCALCULATIONSPanel.FontWeight = 'bold';
app.STRAINCALCULATIONSPanel.Position = [9 235 231 221];
% Create IncidentStrainGaugeDataLabel
app.IncidentStrainGaugeDataLabel = uilabel(app.STRAINCALCULATIONSPanel);
app.IncidentStrainGaugeDataLabel.FontSize = 10;
app.IncidentStrainGaugeDataLabel.FontWeight = 'bold';
app.IncidentStrainGaugeDataLabel.Position = [61 170 133 22];
app.IncidentStrainGaugeDataLabel.Text = 'Incident Strain Gauge Data';
% Create VolagetoStrainFactorEditFieldLabel
app.VolagetoStrainFactorEditFieldLabel = uilabel(app.STRAINCALCULATIONSPanel);
app.VolagetoStrainFactorEditFieldLabel.HorizontalAlignment = 'right';
app.VolagetoStrainFactorEditFieldLabel.FontSize = 10;
app.VolagetoStrainFactorEditFieldLabel.FontWeight = 'bold';
app.VolagetoStrainFactorEditFieldLabel.Position = [19 149 114 22];
app.VolagetoStrainFactorEditFieldLabel.Text = {'Volage to Strain Factor'; ''};
% Create VSIncident
app.VSIncident = uieditfield(app.STRAINCALCULATIONSPanel, 'numeric');
app.VSIncident.FontSize = 10;
app.VSIncident.FontWeight = 'bold';
app.VSIncident.Position = [148 149 71 22];
% Create DistancetoSamplemmEditFieldLabel
app.DistancetoSamplemmEditFieldLabel = uilabel(app.STRAINCALCULATIONSPanel);
app.DistancetoSamplemmEditFieldLabel.HorizontalAlignment = 'right';
app.DistancetoSamplemmEditFieldLabel.FontSize = 10;
app.DistancetoSamplemmEditFieldLabel.FontWeight = 'bold';
app.DistancetoSamplemmEditFieldLabel.Position = [8 120 125 22];
app.DistancetoSamplemmEditFieldLabel.Text = 'Distance to Sample (mm)';
% Create DSIncident
app.DSIncident = uieditfield(app.STRAINCALCULATIONSPanel, 'numeric');
app.DSIncident.FontSize = 10;
app.DSIncident.FontWeight = 'bold';
app.DSIncident.Position = [148 120 71 22];
% Create TransmittedStrainGaugeDataLabel
app.TransmittedStrainGaugeDataLabel = uilabel(app.STRAINCALCULATIONSPanel);
app.TransmittedStrainGaugeDataLabel.FontSize = 10;
app.TransmittedStrainGaugeDataLabel.FontWeight = 'bold';
app.TransmittedStrainGaugeDataLabel.Position = [37 89 152 22];
app.TransmittedStrainGaugeDataLabel.Text = 'Transmitted Strain Gauge Data';
% Create DistancetoSamplemmEditField_2Label
app.DistancetoSamplemmEditField_2Label = uilabel(app.STRAINCALCULATIONSPanel);
app.DistancetoSamplemmEditField_2Label.HorizontalAlignment = 'right';
app.DistancetoSamplemmEditField_2Label.FontSize = 10;
app.DistancetoSamplemmEditField_2Label.FontWeight = 'bold';
app.DistancetoSamplemmEditField_2Label.Position = [14 39 125 22];
app.DistancetoSamplemmEditField_2Label.Text = 'Distance to Sample (mm)';
% Create DSTransmitted
app.DSTransmitted = uieditfield(app.STRAINCALCULATIONSPanel, 'numeric');
app.DSTransmitted.FontSize = 10;
app.DSTransmitted.FontWeight = 'bold';
app.DSTransmitted.Position = [146 39 73 22];
% Create VolagetoStrainFactorEditField_2Label
app.VolagetoStrainFactorEditField_2Label = uilabel(app.STRAINCALCULATIONSPanel);
app.VolagetoStrainFactorEditField_2Label.HorizontalAlignment = 'right';
app.VolagetoStrainFactorEditField_2Label.FontSize = 10;
app.VolagetoStrainFactorEditField_2Label.FontWeight = 'bold';
app.VolagetoStrainFactorEditField_2Label.Position = [17 68 114 22];
app.VolagetoStrainFactorEditField_2Label.Text = {'Volage to Strain Factor'; ''};
% Create VSTransmitted
app.VSTransmitted = uieditfield(app.STRAINCALCULATIONSPanel, 'numeric');
app.VSTransmitted.FontSize = 10;
app.VSTransmitted.FontWeight = 'bold';
app.VSTransmitted.Position = [146 68 73 22];
% Create CalculateStrainButton
app.CalculateStrainButton = uibutton(app.STRAINCALCULATIONSPanel, 'push');
app.CalculateStrainButton.ButtonPushedFcn = createCallbackFcn(app, @CalculateStrainButtonPushed, true);
app.CalculateStrainButton.BackgroundColor = [0.9294 0.6941 0.1255];
app.CalculateStrainButton.FontWeight = 'bold';
app.CalculateStrainButton.Position = [50 12 106 22];
app.CalculateStrainButton.Text = 'Calculate Strain';
% Create STRESSCALCULATIONPanel
app.STRESSCALCULATIONPanel = uipanel(app.ExperimentalResultsTab);
app.STRESSCALCULATIONPanel.Title = 'STRESS CALCULATION';
app.STRESSCALCULATIONPanel.FontWeight = 'bold';
app.STRESSCALCULATIONPanel.Position = [10 39 230 185];
% Create CalculateStressButton
app.CalculateStressButton = uibutton(app.STRESSCALCULATIONPanel, 'push');
app.CalculateStressButton.ButtonPushedFcn = createCallbackFcn(app, @CalculateStressButtonPushed2, true);
app.CalculateStressButton.BackgroundColor = [0.9294 0.6941 0.1255];
app.CalculateStressButton.FontWeight = 'bold';
app.CalculateStressButton.Position = [60 20 109 22];
app.CalculateStressButton.Text = 'Calculate Stress';
% Create ModulusNmm2opLabel
app.ModulusNmm2opLabel = uilabel(app.STRESSCALCULATIONPanel);
app.ModulusNmm2opLabel.BackgroundColor = [0.0745 0.6235 1];
app.ModulusNmm2opLabel.HorizontalAlignment = 'right';
app.ModulusNmm2opLabel.FontSize = 10;
app.ModulusNmm2opLabel.FontWeight = 'bold';
app.ModulusNmm2opLabel.Position = [15 66 114 22];
app.ModulusNmm2opLabel.Text = 'Modulus (N/mm2) (o/p)';
% Create ModulusExp
app.ModulusExp = uieditfield(app.STRESSCALCULATIONPanel, 'numeric');
app.ModulusExp.Editable = 'off';
app.ModulusExp.FontSize = 10;
app.ModulusExp.FontWeight = 'bold';
app.ModulusExp.Position = [140 66 74 22];
% Create WaveSpeedmsLabel
app.WaveSpeedmsLabel = uilabel(app.STRESSCALCULATIONPanel);
app.WaveSpeedmsLabel.HorizontalAlignment = 'right';
app.WaveSpeedmsLabel.FontSize = 10;
app.WaveSpeedmsLabel.FontWeight = 'bold';
app.WaveSpeedmsLabel.Position = [43 130 91 22];
app.WaveSpeedmsLabel.Text = 'Wave Speed (m/s)';
% Create WaveSpeedExp
app.WaveSpeedExp = uieditfield(app.STRESSCALCULATIONPanel, 'numeric');
app.WaveSpeedExp.FontSize = 10;
app.WaveSpeedExp.FontWeight = 'bold';
app.WaveSpeedExp.Position = [141 130 73 22];
% Create Densitykgm3Label
app.Densitykgm3Label = uilabel(app.STRESSCALCULATIONPanel);
app.Densitykgm3Label.HorizontalAlignment = 'right';
app.Densitykgm3Label.FontSize = 10;
app.Densitykgm3Label.FontWeight = 'bold';
app.Densitykgm3Label.Position = [47 98 80 22];
app.Densitykgm3Label.Text = 'Density (kg/m3)';
% Create DensityExp
app.DensityExp = uieditfield(app.STRESSCALCULATIONPanel, 'numeric');
app.DensityExp.FontSize = 10;
app.DensityExp.FontWeight = 'bold';
app.DensityExp.Position = [141 98 73 22];
% Create EDGARMENDONCALabel
app.EDGARMENDONCALabel = uilabel(app.ExperimentalResultsTab);
app.EDGARMENDONCALabel.FontSize = 10;
app.EDGARMENDONCALabel.FontWeight = 'bold';
app.EDGARMENDONCALabel.Position = [3 1 116 22];
app.EDGARMENDONCALabel.Text = '© EDGAR MENDONCA ';
% Create TheoreticalResultsTab
app.TheoreticalResultsTab = uitab(app.TabGroup);
app.TheoreticalResultsTab.Title = 'Theoretical Results';
app.TheoreticalResultsTab.BackgroundColor = [0.902 0.902 0.902];
% Create UIMeanAxialStrainRate
app.UIMeanAxialStrainRate = uiaxes(app.TheoreticalResultsTab);
title(app.UIMeanAxialStrainRate, 'Mean Axial Strain Rate')
xlabel(app.UIMeanAxialStrainRate, 'Time')
ylabel(app.UIMeanAxialStrainRate, 'Mean Strain Rate')
app.UIMeanAxialStrainRate.PlotBoxAspectRatio = [1.96850393700787 1 1];
app.UIMeanAxialStrainRate.FontWeight = 'bold';
app.UIMeanAxialStrainRate.Position = [290 431 300 185];
% Create UIMeanNominalAxialStress
app.UIMeanNominalAxialStress = uiaxes(app.TheoreticalResultsTab);
title(app.UIMeanNominalAxialStress, 'Mean Axial Stress')
xlabel(app.UIMeanNominalAxialStress, 'Time')
ylabel(app.UIMeanNominalAxialStress, 'Mean Stress')
app.UIMeanNominalAxialStress.PlotBoxAspectRatio = [1.96850393700787 1 1];
app.UIMeanNominalAxialStress.FontWeight = 'bold';
app.UIMeanNominalAxialStress.Position = [606 431 300 185];
% Create UINominalStrain
app.UINominalStrain = uiaxes(app.TheoreticalResultsTab);
title(app.UINominalStrain, 'Nominal Strain')
xlabel(app.UINominalStrain, 'Time')
ylabel(app.UINominalStrain, 'Strain')
app.UINominalStrain.PlotBoxAspectRatio = [1.96850393700787 1 1];
app.UINominalStrain.FontWeight = 'bold';
app.UINominalStrain.Position = [290 217 300 185];
% Create UINominalStress
app.UINominalStress = uiaxes(app.TheoreticalResultsTab);
title(app.UINominalStress, 'Nominal Stress')
xlabel(app.UINominalStress, 'Time')
ylabel(app.UINominalStress, 'Stress')
app.UINominalStress.PlotBoxAspectRatio = [1.93846153846154 1 1];
app.UINominalStress.FontWeight = 'bold';
app.UINominalStress.Position = [607 217 300 185];
% Create UITrueStrain
app.UITrueStrain = uiaxes(app.TheoreticalResultsTab);
title(app.UITrueStrain, 'True Strain')
xlabel(app.UITrueStrain, 'Time')
ylabel(app.UITrueStrain, 'True Strain')
app.UITrueStrain.PlotBoxAspectRatio = [1.93846153846154 1 1];
app.UITrueStrain.FontWeight = 'bold';
app.UITrueStrain.Position = [295 8 300 185];
% Create UITrueStress
app.UITrueStress = uiaxes(app.TheoreticalResultsTab);
title(app.UITrueStress, 'True Stress')
xlabel(app.UITrueStress, 'Time')
ylabel(app.UITrueStress, 'True Stress')
app.UITrueStress.PlotBoxAspectRatio = [1.93846153846154 1 1];
app.UITrueStress.FontWeight = 'bold';
app.UITrueStress.Position = [607 8 300 185];
% Create UINominalStressStrain
app.UINominalStressStrain = uiaxes(app.TheoreticalResultsTab);
title(app.UINominalStressStrain, 'Nominal Stress-Strain')
xlabel(app.UINominalStressStrain, 'Strain')
ylabel(app.UINominalStressStrain, 'Stress')
app.UINominalStressStrain.PlotBoxAspectRatio = [1.93846153846154 1 1];
app.UINominalStressStrain.FontWeight = 'bold';
app.UINominalStressStrain.Position = [931 217 300 185];
% Create UITrueStressStrain
app.UITrueStressStrain = uiaxes(app.TheoreticalResultsTab);
title(app.UITrueStressStrain, 'True Stress-Strain')
xlabel(app.UITrueStressStrain, 'True Strain')
ylabel(app.UITrueStressStrain, 'True Stress')
app.UITrueStressStrain.PlotBoxAspectRatio = [1.93846153846154 1 1];
app.UITrueStressStrain.FontWeight = 'bold';
app.UITrueStressStrain.Position = [931 8 300 185];
% Create UINominalStrainRate
app.UINominalStrainRate = uiaxes(app.TheoreticalResultsTab);
title(app.UINominalStrainRate, 'Nominal Strain Rate')
xlabel(app.UINominalStrainRate, 'Time')
ylabel(app.UINominalStrainRate, 'Strain Rate')
app.UINominalStrainRate.PlotBoxAspectRatio = [1.96850393700787 1 1];
app.UINominalStrainRate.FontWeight = 'bold';
app.UINominalStrainRate.Position = [931 427 300 185];
% Create SPECIMENANDBARINPUTSPanel
app.SPECIMENANDBARINPUTSPanel = uipanel(app.TheoreticalResultsTab);
app.SPECIMENANDBARINPUTSPanel.Title = 'SPECIMEN AND BAR INPUTS';
app.SPECIMENANDBARINPUTSPanel.FontWeight = 'bold';
app.SPECIMENANDBARINPUTSPanel.Position = [17 369 260 253];
% Create ModulusofBarNmm2Label
app.ModulusofBarNmm2Label = uilabel(app.SPECIMENANDBARINPUTSPanel);
app.ModulusofBarNmm2Label.HorizontalAlignment = 'right';
app.ModulusofBarNmm2Label.FontSize = 10;
app.ModulusofBarNmm2Label.FontWeight = 'bold';
app.ModulusofBarNmm2Label.Position = [58 70 121 22];
app.ModulusofBarNmm2Label.Text = 'Modulus of Bar (N/mm2)';
% Create ModulusTheory
app.ModulusTheory = uieditfield(app.SPECIMENANDBARINPUTSPanel, 'numeric');
app.ModulusTheory.FontWeight = 'bold';
app.ModulusTheory.Position = [185 70 63 22];
% Create LenghtofSpecimenmmLabel
app.LenghtofSpecimenmmLabel = uilabel(app.SPECIMENANDBARINPUTSPanel);
app.LenghtofSpecimenmmLabel.HorizontalAlignment = 'right';
app.LenghtofSpecimenmmLabel.FontSize = 10;
app.LenghtofSpecimenmmLabel.FontWeight = 'bold';
app.LenghtofSpecimenmmLabel.Position = [52 201 128 22];
app.LenghtofSpecimenmmLabel.Text = 'Lenght of Specimen (mm)';
% Create LoS
app.LoS = uieditfield(app.SPECIMENANDBARINPUTSPanel, 'numeric');
app.LoS.FontWeight = 'bold';
app.LoS.Position = [186 201 63 22];
% Create AreaofSpecimenmm2Label
app.AreaofSpecimenmm2Label = uilabel(app.SPECIMENANDBARINPUTSPanel);
app.AreaofSpecimenmm2Label.HorizontalAlignment = 'right';
app.AreaofSpecimenmm2Label.FontSize = 10;
app.AreaofSpecimenmm2Label.FontWeight = 'bold';
app.AreaofSpecimenmm2Label.Position = [57 169 123 22];
app.AreaofSpecimenmm2Label.Text = 'Area of Specimen (mm2)';
% Create AoS
app.AoS = uieditfield(app.SPECIMENANDBARINPUTSPanel, 'numeric');
app.AoS.FontWeight = 'bold';
app.AoS.Position = [186 169 63 22];