-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mainfunction.m
62 lines (46 loc) · 1.42 KB
/
Mainfunction.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
function Mainfunction
fig6 = figure;
set(fig6,'units','normalized','outerposition',[0 0 1 1]);
hold on
Fnum = 1;
% mags = [];
% maxes = [];
%for v_wave = [0]
D = 200;
Yxtminmin = 0;
Yxtmaxmax = 0;
for v_wave = [0.5:0.1:2];
%hold on
consts = hemodynamicConstants(v_wave,D);
for linearFactor = [1]
consts.linearFactor = linearFactor;
consts.divFactor = 0;
consts.dimRed = 0;
[consts,mats] = createLmatrix(consts);
% Matrix definition
[consts,vecs,mats] = mainMatrix(consts,mats);
mats.Inflow = inflowShape(consts,mats);
[consts,mats] = defineXi0(consts,mats);
if consts.divFactor == 0
[consts,vecs,mats] = findEquilibrium(consts,vecs,mats);
else
[consts,vecs,mats] = findEquilibriummodified(consts,vecs,mats);
end
mats.v_b = sqrt(consts.c1.*mats.c2.*mats.beta.*mats.Xi_0.^(mats.beta-1));
consts.v_baverage = mean(mean(mean(mats.v_b)));
consts.C = max(max(max(consts.deltat/consts.N*mats.v_b*(1/consts.deltax+1/consts.deltay+1/consts.deltaz))));
if consts.dimRed == 0
[consts,vecs,mats] = appliedDrive(consts,vecs,mats);
[consts,vecs,mats] = FNormalization(consts,vecs,mats);
if consts.divFactor == 0
[consts,vecs,mats] = mainHemodynamics(consts,vecs,mats);
else
[consts,vecs,mats] = mainHemodynamicsmodified(consts,vecs,mats);
end
[consts,vecs,mats,Yxtminmin,Yxtmaxmax] = plottingResults(consts,vecs,mats,Fnum,Yxtminmin,Yxtmaxmax);
else
[consts,vecs,mats] = dimReduction(consts,vecs,mats);
end
end
end
end