-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvaryingheights.m
More file actions
27 lines (25 loc) · 839 Bytes
/
varyingheights.m
File metadata and controls
27 lines (25 loc) · 839 Bytes
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
close all;
clear;
clc;
format short;
source_speed = 0.05; % strength of source in hood, ~0.05 m3/s
vent_speed = 0.200; % strengh of vent in hood, 0.1572-0.498 m3/s
show_graphs = false; %show intermediate graphs or not
threshold = 0.0002; % amount of gas (m3) at entrance before gas has escaped
heights = 0.1:0.01:0.65; % height of sash, 0.1-0.65m
volumes = zeros(1, length(heights));
times = zeros(1, length(heights));
for i = 1:length(heights)
height = heights(i);
volumes(i) = stationary(height, source_speed, vent_speed, show_graphs);
if volumes(i) < threshold
times(i) = -1;
else
times(i) = projecttube(height, source_speed, vent_speed, show_graphs);
end
disp([num2str(height), ',', num2str(volumes(i)), ',', num2str(times(i))]);
end
figure
plot(heights, volumes);
figure
plot(heights, times);