Permalink
Browse files
Add files via upload
adding postprocessing codes for MC uncertainty
- Loading branch information
Showing
with
8,215 additions
and 0 deletions.
- +839 −0 postprocess_codes/Jet_data_postprocess.m
- +569 −0 postprocess_codes/Jet_data_postprocess_pranaonly.m
- +134 −0 postprocess_codes/RMS_line_profile_for_2003B.m
- +456 −0 postprocess_codes/RMS_spatial_profiles.m
- +420 −0 postprocess_codes/RMS_spatial_profiles_2Dmap.m
- +783 −0 postprocess_codes/compute_error_uncertainty.m
- +35 −0 postprocess_codes/convert_sim_images_to_davis.m
- +99 −0 postprocess_codes/gradient_compact_rich.m
- +133 −0 postprocess_codes/gradient_compactrich.m
- +129 −0 postprocess_codes/gradient_dudxdvdy_compact_rich.m
- +79 −0 postprocess_codes/in_out_directory_set.m
- +80 −0 postprocess_codes/in_out_directory_set_03_09_2017.m
- +79 −0 postprocess_codes/in_out_directory_set_03_09_2017_ws64.m
- +79 −0 postprocess_codes/in_out_directory_set_07_30_2018_ws1.m
- +80 −0 postprocess_codes/in_out_directory_set_07_30_2018_ws2.m
- +79 −0 postprocess_codes/in_out_directory_set_10_22_2015.m
- +681 −0 postprocess_codes/pivchal05b_ixx_postprocess.m
- +1,534 −0 postprocess_codes/plot_MC_uncertainty.m
- +51 −0 postprocess_codes/plotting_jetdata_uncertainty.m
- +602 −0 postprocess_codes/postprocess_prana_2003B.m
- +189 −0 postprocess_codes/run_MC_uncertainty_analysis.m
- +56 −0 postprocess_codes/socdiff.m
- +399 −0 postprocess_codes/stagnation_flow_postprocess.m
- +31 −0 postprocess_codes/tridiagSolve.m
- +599 −0 postprocess_codes/vortexring_original_uncertainty_postprocess.m
@@ -0,0 +1,134 @@ | ||
% Extract RMS line profile for 2003B case | ||
|
||
clear; | ||
%flags | ||
printfig=0; | ||
runCS=1; | ||
runIM=1; | ||
runMC=1; | ||
savemat=0; | ||
loadmat=1; | ||
|
||
|
||
if ispc | ||
basedirname='Z:\Planar_Uncertainty_work\'; | ||
else | ||
basedirname='/home/shannon/a/bhattac3/Planar_Uncertainty_work/'; | ||
end | ||
|
||
%cases | ||
casename_org={'PivChal03B','PivChal05B','stagnation_flow','Vortex_Ring','Jetdata'}; | ||
% casename={'PivChal03B','','','',''}; | ||
|
||
% casename={'','PivChal05B','','',''}; | ||
|
||
% casename={'','','stagnation_flow','',''}; | ||
|
||
% casename={'','','','Vortex_Ring',''}; | ||
|
||
% casename={'','','','','Jetdata'}; | ||
|
||
% runname='10_14_2015_deform_whittaker_blackman'; | ||
runname='10_22_2015_different_processing_windows'; | ||
%% | ||
%Get directories | ||
% [inputdir,outputdir]=in_out_directory_set(basedirname,runname); | ||
[inputdir,outputdir]=in_out_directory_set_10_22_2015(basedirname,runname); | ||
|
||
|
||
% casename1={'PivChal03B','PivChal05B','stagnation_flow','Vortex_Ring','Jetdata'}; | ||
%%Compute error and uncertainty estimates for each case | ||
% compute_error_uncertainty(casename1,inputdir,outputdir,savemat); | ||
%% Load matfile for the case | ||
|
||
casename={'PivChal03B','','','',''}; | ||
if loadmat==1 | ||
A1=load(fullfile(outputdir{1},'PivChal03B.mat')); | ||
end | ||
% [covxMC,covyMC,covxIM,covyIM,covxCS,covyCS]=plot_MC_uncertainty(A1,casename,outputdir,printfig,runCS,runIM,runMC); | ||
% covg1=[covxMC,covyMC,covxIM,covyIM,covxCS,covyCS]; | ||
%{ | ||
%% Convert to vectors | ||
err_up=A.err_up(:); | ||
err_vp=A.err_vp(:); | ||
err_ud=A.err_ud(:); | ||
err_vd=A.err_vd(:); | ||
UMCx=A.UMCx(:); | ||
UMCy=A.UMCy(:); | ||
UIMx=A.UIMx(:); | ||
UIMy=A.UIMy(:); | ||
UCSx=A.UCSx(:); | ||
UCSy=A.UCSy(:); | ||
%% Eliminate bad vectors | ||
veccutoff=0.1; | ||
inx1=(find(abs(err_up)>veccutoff)); | ||
iny1=(find(abs(err_vp)>veccutoff)); | ||
inx2=(find(abs(err_ud)>veccutoff)); | ||
iny2=(find(abs(err_vd)>veccutoff)); | ||
err_up(inx1)=[]; | ||
err_vp(iny1)=[]; | ||
UMCx(inx1)=[]; | ||
UMCy(iny1)=[]; | ||
UIMx(inx1)=[]; | ||
UIMy(iny1)=[]; | ||
err_ud(inx2)=[]; | ||
err_vd(iny2)=[]; | ||
UCSx(inx2)=[]; | ||
UCSy(iny2)=[]; | ||
%} | ||
|
||
% % %% Extract RMS profile at x=96th column | ||
% % % RMS error | ||
% % c1=96; | ||
% % Upt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2); | ||
% % Vpt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2); | ||
% % Velpt=sqrt(Upt.^2+Vpt.^2); | ||
% % c2=95; | ||
% % Udt=rms(squeeze(A1.err_ud(end:-1:1,c2,:)),2); | ||
% % Vdt=rms(squeeze(A1.err_vd(end:-1:1,c2,:)),2); | ||
% % Veldt=sqrt(Udt.^2+Vdt.^2); | ||
% % | ||
% % %RMS uncertainty | ||
% % UMCt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2); | ||
% % VMCt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2); | ||
% % VelMC=sqrt(Upt.^2+Vpt.^2); | ||
% % | ||
% % %% Plot RMS profiles | ||
% % | ||
% % figure;hold on; | ||
% % plot(Velpt,1:63,'k-'); | ||
% % plot(Veldt,1:62,'k--'); | ||
|
||
%% Extract RMS profile at x=96th column | ||
% RMS error | ||
|
||
%% Eliminate bad vectors | ||
veccutoff=0.1; | ||
c1=96; | ||
Upt=squeeze(A1.err_up(end:-1:1,c1,:));Upt(Upt>veccutoff)=nan; | ||
Vpt=squeeze(A1.err_vp(end:-1:1,c1,:));Vpt(Vpt>veccutoff)=nan; | ||
Velpt=sqrt(Upt.^2+Vpt.^2); | ||
[inpy,inpx]=find(isnan(Velpt)); | ||
Velptrms=sqrt(nanmean(Velpt.^2,2)); | ||
c2=96; | ||
Udt=squeeze(A1.err_ud(end:-1:1,c2,:));Udt(Udt>veccutoff)=nan; | ||
Vdt=squeeze(A1.err_vd(end:-1:1,c2,:));Vdt(Vdt>veccutoff)=nan; | ||
Veldt=sqrt(Udt.^2+Vdt.^2); | ||
Veldtrms=sqrt(nanmean(Veldt.^2,2)); | ||
|
||
%RMS uncertainty | ||
UMCt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2); | ||
VMCt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2); | ||
VelMC=sqrt(Upt.^2+Vpt.^2); | ||
|
||
|
||
%% Plot RMS profiles | ||
|
||
figure;hold on; | ||
plot(Velptrms,1:63,'k-'); | ||
plot(Veldtrms,1:62,'k--'); | ||
|

Oops, something went wrong.