Skip to content

Commit de01d8b

Browse files
committed
bringing back post_processing files, need to make them compatible with current output
1 parent a0604c7 commit de01d8b

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

src/post_processing/f_f_filter.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function [feps_r] = f_f_filter(f_r,N,M)
2+
%F_MUFILTER Summary of this function goes here
3+
% Detailed explanation goes here
4+
eps = 0.01;
5+
feps_r = zeros(size(f_r));
6+
for i = 1:N
7+
for j = 1:M
8+
if f_r(i,j) > 1-eps
9+
feps_r(i,j) = NaN;
10+
elseif f_r(i,j) < eps
11+
feps_r(i,j) = NaN;
12+
else
13+
feps_r(i,j) = f_r(i,j);
14+
end
15+
end
16+
end
17+
18+
end

src/post_processing/f_gammadot_r.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function sofr = f_gammadot_r(r,R,Rdot,N,M)
2+
% shear as a function of r (radial coordinate) calculation
3+
sofr = zeros(N,M);
4+
for i = 1:N
5+
for j = 1:M
6+
if r(i,j) >= R(i,1)
7+
sofr(i,j) = -2*Rdot(i,1)*(R(i,1)^2)/((r(i,j))^3);
8+
else
9+
sofr(i,j) = NaN;
10+
end
11+
end
12+
end
13+
end
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
fig_tend = 30;
2+
tickrange= [0:5:fig_tend];
3+
lR = length(R);
4+
lr_max = 100;
5+
lr_N = 200;
6+
lr_length = 4;
7+
r_coord = ones(lR,lr_N).*logspace(-0.5,lr_length,lr_N);
8+
% calculating the shear
9+
varsigmadot_r = f_gammadot_r(r_coord,R,U,lR,lr_N);
10+
f_r = sf_carreau(v_nc,v_lambda,varsigmadot_r);
11+
[xcon,ycon] = meshgrid(t,r_coord(1,:));
12+
ycon = log10(ycon);
13+
clevels = 50;
14+
feps_r = f_f_filter(f_r,lR,lr_N);
15+
tau_r = 2*(feps_r./DRe+1./Re8).*varsigmadot_r;
16+
min_tau_r = min(min(tau_r))
17+
max_tau_r = max(max(tau_r))
18+
ntau_r = tau_r/max_tau_r;
19+
20+
% f contour figure
21+
figure(5)
22+
hold on;
23+
xlabel('$t / t_c$', 'Interpreter', 'Latex', 'FontSize', 20);
24+
ylabel('log$_{10}(\it{r}/R_o)$','Interpreter','Latex','FontSize',24);
25+
colormap jet;
26+
cbar = colorbar;
27+
cbar.Label.String = '$m(\dot{\varsigma})$';
28+
set(cbar,'TickLabelInterpreter','latex');
29+
pos = get(cbar,'Position');
30+
cbar.Label.Position = [pos(1) -0.04];
31+
cbar.Label.Rotation = 0;
32+
cbar.Label.Interpreter = 'latex';
33+
caxis([0 1]);
34+
xlim([0 fig_tend]);
35+
xticks(tickrange)
36+
set(gcf,'color','w');
37+
set(gca,'FontName','Times','FontSize',20);
38+
set(gca,'TickLabelInterpreter','latex')
39+
xa = gca;
40+
xa.TickLength = [.015 .015];
41+
xa.LineWidth = 1.5;
42+
box on;
43+
plot(t, log10(R),lm,'LineWidth',3);
44+
contourf(xcon',ycon',f_r,clevels,'edgecolor','none')
45+
saveas(gcf,'./figs/baseline/fcon_T','png')
46+
47+
% shear stress contour figure
48+
figure(6)
49+
hold on;
50+
xlabel('$t / t_c$', 'Interpreter', 'Latex', 'FontSize', 20);
51+
ylabel('log$_{10}(\it{r}/R_o)$','Interpreter','Latex','FontSize',24);
52+
colormap jet;
53+
cbar = colorbar;
54+
cbar.Label.String = '$\tau_{rr}/\mathrm{max}(\tau_{rr})$';
55+
set(cbar,'TickLabelInterpreter','latex');
56+
pos = get(cbar,'Position');
57+
cbar.Label.Position = [1.5*pos(1) -1.2];
58+
cbar.Label.Rotation = 0;
59+
cbar.Label.Interpreter = 'latex';
60+
caxis([-1 1])
61+
xlim([0 fig_tend]);
62+
xticks(tickrange)
63+
set(gcf,'color','w');
64+
set(gca,'FontName','Times','FontSize',20);
65+
set(gca,'TickLabelInterpreter','latex')
66+
xa = gca;
67+
xa.TickLength = [.015 .015];
68+
xa.LineWidth = 1.5;
69+
box on;
70+
plot(t, log10(R),lm,'LineWidth',3);
71+
contourf(xcon',ycon',ntau_r,clevels,'edgecolor','none');
72+
saveas(gcf,'./figs/baseline/taucon_T','png')

0 commit comments

Comments
 (0)