-
Notifications
You must be signed in to change notification settings - Fork 1
/
RTpostprocessing.m
44 lines (30 loc) · 1.08 KB
/
RTpostprocessing.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
close all
clear all
dt = 0.000811;
time = dt:dt:(dt*1000) ;
path = [ '~/Documents/lab/KD-project/AdvectionDiffusion/right/asi2/m5/RT1/' ] ;
%path = ['~/Documents/lab/KD-project/AdvectionDiffusion/baseline/asi6/' ];
no_offset = false;
volume_integral = load( [path , 'int_r.dat'] );
volume = load( [path,'Volume.dat'] ) ;
figure
plot(volume_integral(:,end)) ;
l=length(volume_integral(:,1)) ;
% initialize variables
norm_RT1 = 0;
RT1 = 0;
if no_offset
time_integral = trapz(time ,volume_integral(l-1000 + 1:end,2) ) ;
RT1 = time_integral/volume ;
norm_volume_integral = volume_integral/volume - 1 ;
norm_RT1 = trapz(time ,norm_volume_integral(l-1000 + 1:end,2) ) ;
RT1 = trapz(time ,volume_integral(l-1000 + 1:end,2) )/volume
else
time_integral = trapz(time ,volume_integral(l-1000 + 1:end,2) ) ;
RT1 = time_integral/volume ;
norm_volume_integral = volume_integral/volume - 1 ;
norm_RT1 = trapz(time ,norm_volume_integral(l-1000 + 1:end,2) ) ;
end
display(path)
display(['RT1 = ', num2str(norm_RT1), ' [s]'])
display(['Vol = ', num2str(volume),])