Snoopy Version 6.0 (Albert)
timevol_new.m File Reference

Functions

This file is part of the
Snoopy code Snoopy code is
free either version of the 
or (at your option) any later version.%Snoopy code is distributed in the hope that it will be useful
 figure (8) semilogy(t
 title ('Turbulent Transport') clear mean_transport
if length (vxvy) > mean_start mean_vel_transport
 plot (t, vxmax, t, vxmin)
 title ('Velocity field;extrema vx, vy, vz')
 subplot (3, 1, 2)
 plot (t, vymax, t, vymin)
 subplot (3, 1, 3)
 plot (t, vzmax, t, vzmin)
end if exist ('bxmax')&&exist('bxmin')&&exist('bymax')&&exist('bymin')&&exist('bzmax')&&exist('bzmin') figure(4) subplot(3
end if plot (t, bxmax, t, bxmin)
 title ('Magnetic field;extrema bx, by, bz')
 plot (t, bymax, t, bymin)
 plot (t, bzmax, t, bzmin)
end if exist ('j2')&&exist('w2') figure(11) semilogy(t
end if legend ('Enstrophy','J^2') xlabel('t'
end if set (gca,'fontsize', 16) elseif exist('w2') figure(11) semilogy(t
end if legend ('Enstrophy') xlabel('t'
end if title ('Magnetic helicity') xlabel('t'
 title ('Density field extrema')
end if exist ('az2') figure(14) plot(t
 title ('potential vector') end if exist('vxaz') figure(15) plot(t
 title ('potential vector source') end if exist('hc') figure(16) plot(t

Variables

This file is part of the
Snoopy code Snoopy code is
free 
software
This file is part of the
Snoopy code Snoopy code is
free either version of the 
License
This file is part of the
Snoopy code Snoopy code is
free either version of the but
WITHOUT ANY 
WARRANTY
without even the implied
warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR
PURPOSE See the GNU General
Public License for more
details You should have
received a copy of the GNU
General Public License along
with Snoopy code If 
not
without even the implied
warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR
PURPOSE See the GNU General
Public License for more
details You should have
received a copy of the GNU
General Public License along
with Snoopy code If see< http:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Example
File:how to read the timevar
file in Matlab%This example
reads all the variable in the
timevar file%and display the
time history of several
quantities...rep='../';mean_start=100;%Where
do we start our time-averages?full_file=importdata([rep,'timevar']);timevar=transpose(full_file.data);nvar=size(timevar,
1);var_name=strread(full_file.textdata{1},'%s',
nvar);for i=1:nvar assignin('base',
var_name{i}, timevar(i,:));end%mag.helicity=timevar(22,:);%Only
when braginskii pressure is
present%brag.p=timevar(23,:);%brag.stress=timevar(24,:);%mode1.kx=timevar(23,:);%mode1.wz=timevar(24,:);%mode2.kx=timevar(25,:);%mode2.wz=timevar(26,:);%vel.shear=timevar(20,:);%vel.vxmode=timevar(20,:);%vel.vymode=timevar(21,:);if
exist('dvxvy') vxvy=dvxvy;endif
exist('vxvy')&&exist('bxby')
alpha=vxvy-bxby;figure(8) plot(t,
alpha, t, bxby, t, vxvy);legend('alpha
coefficient','Maxwell Stress','Reynolds
Stress');title('Turbulent
Transport') clear
mean_transport;if length(vxvy) >
mean_start 
mean_vel_transport = cumsum(vxvy(mean_start:end))./(1:length(vxvy(mean_start:end)))
 mean_mag_transport = cumsum(bxby(mean_start:end))./(1:length(bxby(mean_start:end)))
 mean_tot_transport = cumsum(alpha(mean_start:end))./(1:length(alpha(mean_start:end)))
 e
 alpha_b = mean_mag_transport(end)
 alpha
end if w2
end if t
end if j2
end if linewidth
end if fontsize
end if hm
end if dmax
end if dmin
end if az2
 vxaz
 hc

Function Documentation

end if exist ( 'bxmax'  )
end if exist ( 'j2 )
end if exist ( 'az2 )
figure ( )
end if legend ( 'Enstrophy'  ,
'J^2'   
)
end if legend ( 'Enstrophy'  )
if length ( vxvy  )

Here is the caller graph for this function:

This file is part of the Snoopy code Snoopy code is free either version of the or ( at your  option)
plot ( t  ,
vymax  ,
t  ,
vymin   
)
plot ( t  ,
vzmax  ,
t  ,
vzmin   
)
plot ( t  ,
bzmax  ,
t  ,
bzmin   
)
plot ( t  ,
vxmax  ,
t  ,
vxmin   
)
end if plot ( t  ,
bxmax  ,
t  ,
bxmin   
)
plot ( t  ,
bymax  ,
t  ,
bymin   
)
end if set ( gca  ,
'fontsize ,
16   
)
subplot ( ,
,
 
)
subplot ( ,
,
 
)
title ( 'potential vector source'  )
title ( 'Magnetic field;extrema  bx,
by  ,
bz'   
)
title ( 'Velocity field;extrema  vx,
vy  ,
vz'   
)
title ( 'Density field extrema'  )
title ( 'potential vector'  )
title ( 'Turbulent Transport'  )
end if title ( 'Magnetic helicity )

Variable Documentation

Initial value:
alpha_v-alpha_b
    else
        disp(['Caution, we are not removing initial conditions'])
end if az2
end if dmax
end if dmin
e
Initial value:
mean(ev(mean_start:end))
        alpha_v=mean_vel_transport(end)
end if fontsize
hc
end if hm
end if j2
This file is part of the Snoopy code Snoopy code is free either version of the License
end if linewidth
mean_mag_transport = cumsum(bxby(mean_start:end))./(1:length(bxby(mean_start:end)))
mean_tot_transport = cumsum(alpha(mean_start:end))./(1:length(alpha(mean_start:end)))
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with Snoopy code If see<http:%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example File: how to read the timevar file in Matlab% This example reads all the variable in the timevar file% and display the time history of several quantities...rep='../';mean_start=100; % Where do we start our time-averages?full_file=importdata([rep,'timevar']);timevar=transpose(full_file.data);nvar=size(timevar,1);var_name=strread(full_file.textdata{1},'%s',nvar);for i=1:nvar assignin('base',var_name{i},timevar(i,:)); end%mag.helicity=timevar(22,:);% Only when braginskii pressure is present%brag.p=timevar(23,:);%brag.stress=timevar(24,:);%mode1.kx=timevar(23,:);%mode1.wz=timevar(24,:);%mode2.kx=timevar(25,:);%mode2.wz=timevar(26,:);%vel.shear=timevar(20,:);%vel.vxmode=timevar(20,:);%vel.vymode=timevar(21,:);if exist('dvxvy') vxvy=dvxvy;endif exist('vxvy')&&exist('bxby') alpha=vxvy-bxby; figure(8) plot(t,alpha,t,bxby,t,vxvy); legend('alpha coefficient','Maxwell Stress','Reynolds Stress'); title('Turbulent Transport') clear mean_transport; if length(vxvy) > mean_start mean_vel_transport = cumsum(vxvy(mean_start:end))./(1:length(vxvy(mean_start:end)))
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with Snoopy code If not
This file is part of the Snoopy code Snoopy code is free software
end if t
end if w2
This file is part of the Snoopy code Snoopy code is free either version of the but WITHOUT ANY WARRANTY