diff --git a/BD_librational.m b/BD_librational.m new file mode 100644 index 0000000..70bf576 --- /dev/null +++ b/BD_librational.m @@ -0,0 +1,56 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% BD_Fresnel_GUI.m +% +% Initial version (1.0): 10/01/15 - Manuel Ferdinandus +% Latest revision (1.6): 03/09/17 - Manuel Ferdinandus +% +% GUI wrapper for the beam deflection signal calculator +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% +% INPUT + +function[R_l_interp] = BD_librational(n_2l,omega_0,omega_std,tau_lf,tau_p,T1,diagnostics) + +if n_2l ~= 0 && omega_0 > 0 && omega_std > 0 && tau_lf > 0; % only if parameters are valid + + omega_0 = omega_0 * tau_p; % central Frequency of Gaussian distribution of quantum oscillators [s^-1] + omega_std = omega_std * tau_p; % standard Deviation of Gaussian distribution of quantum oscillators [s^-1] + tau_lf = tau_lf / tau_p; % librational fall time [s] + + omega_pts = 2^10; + omega = linspace(0,3*omega_0,omega_pts); % frequency distribution for integration of librational response [s^-1] + delta_omega = omega(2) - omega(1); % frequency step [s^-1] + omega = omega + delta_omega; % shift so first element is not zero + + T_pts = 2^12; + T2 = linspace(min(T1),5*tau_lf,T_pts); + [Tl,omegal] = meshgrid(T2,omega); % 2D matricies of time and frequency + + g = exp(-(omegal - omega_0).^2/2/omega_std^2) - exp(-(omegal + omega_0).^2/2/omega_std^2); + int_l = heaviside(Tl) ./ omegal .* sin(heaviside(Tl).*omegal.*Tl) .*exp(-heaviside(Tl).*Tl/tau_lf); + r_l = trapz(omega,g .* int_l,1); + + C_l = 1/trapz(T2,r_l); + + R_l = n_2l*C_l*r_l; % normalize and scale + R_l_interp = interp1(T2,R_l,T1); % interpolate to requested points in time + +else + + R_l_interp = 0*T1; % set the response to zero + +end + +if diagnostics % plot response function for diagnostics + + figure('Name','Librational response function R_l[t]') + plot(T1,R_l_interp); + axis('tight'); + xlabel('t (tau_p)'); + ylabel('R_l[t] (m^2/W)'); + title('Librational response function R_l[t]'); + +end \ No newline at end of file diff --git a/BD_vibrational.m b/BD_vibrational.m new file mode 100644 index 0000000..4085697 --- /dev/null +++ b/BD_vibrational.m @@ -0,0 +1,50 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% BD_Fresnel_GUI.m +% +% Initial version (1.0): 10/01/15 - Manuel Ferdinandus +% Latest revision (1.6): 03/09/17 - Manuel Ferdinandus +% +% GUI wrapper for the beam deflection signal calculator +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% +% INPUT + +function[R_v] = BD_vibrational(n_2v,w_0v,tau_vf,tau_p,T1,diagnostics) + +if n_2v ~= 0 && w_0v > 0 && tau_vf > 0; % only if parameters are valid + + w_0v = w_0v * tau_p; % central Frequency of Gaussian distribution of quantum oscillators [s^-1] + tau_vf = tau_vf / tau_p; % vibrational fall time [s] + r_v = heaviside(T1) .* sin(heaviside(T1) .* w_0v .* T1) .* exp(-heaviside(T1) .* T1 / tau_vf); + + if max(T1)/tau_vf > 10 + + C_v = 1/trapz(T1,r_v); + + else + + C_v = 1/(w_0v / (w_0v^2 + (1/tau_vf)^2)); % normalization factor + + end + + R_v = n_2v*C_v*r_v; % normalize and scale the response + +else + + R_v = 0*T1; % set the response to zero + +end + +if diagnostics % plot response function for diagnostics + + figure('Name','Vibrational response function R_v[t]') + plot(T1,R_v); + axis('tight'); + xlabel('t (tau_p)'); + ylabel('R_v[t] (m^2/W)'); + title('Vibrational response function R_v[t]'); + +end \ No newline at end of file diff --git a/I_e_func.m b/I_e_func.m new file mode 100644 index 0000000..222122b --- /dev/null +++ b/I_e_func.m @@ -0,0 +1,17 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% BD_Fresnel_GUI.m +% +% Initial version (1.0): 10/01/15 - Manuel Ferdinandus +% Latest revision (1.6): 03/09/17 - Manuel Ferdinandus +% +% GUI wrapper for the beam deflection signal calculator +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% irradiance of probe as function of time and space +function output = I_e_func(z,t,I_0_e,v_e,v_p,tau_e) + + output = I_0_e*exp(-(t - z/v_e + z/v_p)^2/tau_e^2); + +end \ No newline at end of file diff --git a/excite_prop.m b/excite_prop.m new file mode 100644 index 0000000..74ba9c7 --- /dev/null +++ b/excite_prop.m @@ -0,0 +1,36 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% BD_Fresnel_GUI.m +% +% Initial version (1.0): 10/01/15 - Manuel Ferdinandus +% Latest revision (1.6): 03/09/17 - Manuel Ferdinandus +% +% GUI wrapper for the beam deflection signal calculator +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function dN = excite_prop(t,y,z,... + I_0_e,v_e,v_p,tau_e,E_photon,... + sigma_S_01,sigma_S_12,sigma_T_12,... + tau_ISC,tau_S_10,tau_S_21,tau_TS,tau_T_21,... + alpha_2) + + I_e = I_e_func(z,t,I_0_e,v_e,v_p,tau_e); + + c = [sigma_S_01/E_photon*I_e*y(1),... % absorption from S_0 to S_1 + sigma_S_12/E_photon*I_e*y(2),... % absorption from S_1 to S_2 + sigma_T_12/E_photon*I_e*y(4),... % absorption from T_1 to T_2 + y(2)/tau_ISC,... % intersystem crossing from S_1 to T_1 + y(2)/tau_S_10,... % decay from S_1 to S_0 + y(3)/tau_S_21,... % decay from S_2 to S_1 + y(4)/tau_TS,... % decay from T_1 to S_0 + y(5)/tau_T_21,... % decay from T_2 to T_1 + alpha_2/(2*E_photon)*I_e^2]; % two photon absorption + + dN = [-c(1) + c(5) + c(7) + c(9) % N_S_0 + c(1) - c(2) - c(4) - c(5) + c(6); % N_S_1 + c(2) - c(6) + c(9); % N_S_2 + -c(3) + c(4) - c(7) + c(8) % N_T_1 + c(3) - c(8)]; % N_T_2 + +end \ No newline at end of file diff --git a/set_params_GUI.fig b/set_params_GUI.fig new file mode 100644 index 0000000..3197553 Binary files /dev/null and b/set_params_GUI.fig differ