A tool to estimate missing energy at a given spatial resolution for turbulent boundary layers function SRdiff = SR_estimation(zexp,SR_x,SR_y,SR_z,vel_comp) % Estimation tool that calculates missing energy due to a given spatial % resolution of an experiment % Authors: J. H. Lee, Kevin, J. P. Monty and N. Hutchins, The University of Melbourne % Date: 29-February-2016 % INPUT % zexp = wall-normal (z) position in viscous units for experiments % SR_x = spatial resolution in viscous unit in the streamwise direction % SR_y = spatial resolution in viscous unit in the spanwise direction % SR_z = spatial resolution in viscous unit in the wall-normal direction % vel_comp = 1 - missing energy for u component (default) % 2 - missing energy for v (spanwise) component % 3 - missing energy for w (wall-normal) component % OUTPUT % SRdiff = linearly interpolated missing energy profile (inner-normalised) throughout % a given wall position for a given spatial resolution of an experiment % e.g if one wants to estimate the missing energy profile of u component % for a spatial resolution of 50 x 50 x 50 (xi x yi x zi) in viscous unit, % uvardiff = SR_estimation(zplus_exp,50,50,50,1); % e.g if one wants to estimate the missing energy profile of u component % for a single-normal hotwire with a sensor length of 22 viscous wall units % oriented in the spanwise direction. % uvardiff_lplus = SR_estimation(zplus_exp,0,22,0,1); load('348_2016_2209_MOESM1_ESM.mat') if nargin < 5 || vel_comp == 1; SR_DB = SR_u_DB; elseif vel_comp == 2; SR_DB = SR_v_DB; elseif vel_comp == 3; SR_DB = SR_w_DB; end if SR_z == 0 [zplus_exp,xexp,yexp] = ndgrid(zexp,SR_x,SR_y); SRdiff = interpn(zplus_DB(:,:,:,1),x_DB(:,:,:,1),y_DB(:,:,:,1),SR_DB(:,:,:,1),zplus_exp,xexp,yexp); else [zplus_exp,xexp,yexp,zexp] = ndgrid(zexp,SR_x,SR_y,SR_z); SRdiff = interpn(zplus_DB,x_DB,y_DB,z_DB,SR_DB,zplus_exp,xexp,yexp,zexp); end end