-
Notifications
You must be signed in to change notification settings - Fork 2
/
tt_histogram.m
88 lines (65 loc) · 2.97 KB
/
tt_histogram.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
function res = tt_histogram(velocity)
res = 1;
% Fluctuating velocities
vel_prime = tt_prime_velocities(velocity);
figure('Position',[10 50 1200 400])
subplot(1,3,1)
hist(vel_prime.x,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','k')
xlabel('$\frac{cm}{s}$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('V{\prime}_{x}','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(1,3,2)
hist(vel_prime.y,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','g','EdgeColor','k')
xlabel('$\frac{cm}{s}$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('V{\prime}_{x}','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(1,3,3)
hist(vel_prime.z,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','k')
xlabel('$\frac{cm}{s}$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('V{\prime}_{x}','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
% Reynolds Stresses
[ans, tauRe] = tt_ReynoldsStresses(velocity);
tauRe_aux = [tauRe.xx; tauRe.xy; tauRe.xz; tauRe.yy; tauRe.yz; tauRe.zz]';
figure('Position',[10 50 1600 800])
subplot(2,3,1)
hist(tauRe.xx,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','k')
xlabel('$\tau_{xx}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(2,3,2)
hist(tauRe.yy,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','g','EdgeColor','k')
xlabel('$\tau_{yy}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(2,3,3)
hist(tauRe.zz,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','b','EdgeColor','k')
xlabel('$\tau_{zz}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(2,3,4)
hist(tauRe.xy,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[1 0.6 0],'EdgeColor','k')
xlabel('$\tau_{xy}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(2,3,5)
hist(tauRe.xz,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[0 0.5 0],'EdgeColor','k')
xlabel('$\tau_{xz}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
subplot(2,3,6)
hist(tauRe.yz,100)
h = findobj(gca,'Type','patch');
set(h,'FaceColor',[0 0 0.8],'EdgeColor','k')
xlabel('$\tau_{yz}\left(\frac{cm^{2}}{s^{2}}\right)$','Interpreter','LaTex','FontSize',14,'FontWeight','bold')
ylabel('pdf','Interpreter','LaTex','FontSize',14,'FontWeight','bold','Rotation',0)
res = 0;
res