Skip to content
Snippets Groups Projects
Commit 24f4d8a2 authored by Charlotte Bond's avatar Charlotte Bond
Browse files

tidying up and matching use to vinet09

parent f66a8645
No related branches found
No related tags found
No related merge requests found
...@@ -3,11 +3,15 @@ ...@@ -3,11 +3,15 @@
% FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,num_terms) % FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,num_terms)
% %
% A function for Matlab which calculates the approximate paraboloid for the % A function for Matlab which calculates the approximate paraboloid for the
% thermal distortion of a mirror. % thermal distortion of a mirror due to an incident beam absorbed in the
% coating or substrate.
% %
% N.B. currently only valid for and LG00 incident beam.
%
% coeffs: Coefficients for bessel expansion of thermal distortion.
% SV: Saint-Venant correction.
% beam: Structure storing beam parameters (FT_init_thermal_beam.m). % beam: Structure storing beam parameters (FT_init_thermal_beam.m).
% mirror: Structure storing mirror parameters (FT_init_thermal_mirror.m). % mirror: Structure storing mirror parameters (FT_init_thermal_mirror.m).
% num_terms:Number of terms to use in approximation of thermal distortion.
% %
% c,p: Parameters for best fitted paraboloid: % c,p: Parameters for best fitted paraboloid:
% Z = c*r^2+p % Z = c*r^2+p
...@@ -17,28 +21,22 @@ ...@@ -17,28 +21,22 @@
%-------------------------------------------------------------------------- %--------------------------------------------------------------------------
% %
function [c,p] = FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,num_terms) function [c,p] = FT_approximate_paraboloid_for_thermal_distortion(coeffs,SV,beam,mirror)
% Beam parameters X = mirror.X;
P = beam.P; a = mirror.a;
w = beam.w; w = beam.w;
% Mirror parameters
alpha = mirror.alpha;
pois = mirror.pois; pois = mirror.pois;
Cabs = mirror.Cabs; Y = mirror.Y;
K = mirror.K;
a = mirror.a; % Number of terms in expansion
h = mirror.h; num_terms = length(coeffs);
X = mirror.X;
% Factors % Calculating bessel zeros
k1 = - alpha*(1+pois)*Cabs*P/(4*pi*a^2*K); zeta_0 = FT_bessel_zeros(0,X,num_terms);
k2 = - alpha*(1+pois)*Cabs*P/(pi*K); y0 = zeta_0.^2*w^2/(8*a^2);
% Calculate coefficents c0 = -2/w^2*exp(-y0).*y0;
zeta_0s = FT_bessel_zeros(0,X,num_terms);
x_0s = zeta_0s.^2 * w^2 / (8*a^2);
% Initial paraboloid parameters % Initial paraboloid parameters
c = 0; c = 0;
...@@ -47,11 +45,13 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,nu ...@@ -47,11 +45,13 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,nu
% Calculate parabaloid terms % Calculate parabaloid terms
for s=1:num_terms for s=1:num_terms
c = c + k1 * (zeta_0s(s)^3*exp(-zeta_0s(s)^2*w^2/(4*a^2))/((zeta_0s(s)^2+X^2)*(besselj(0,zeta_0s(s))^2))) * (zeta_0s(s)+X-(zeta_0s(s)-X)*exp(-2*zeta_0s(s)*h/a)) / ((zeta_0s(s)+X)^2-(zeta_0s(s)-X)^2*exp(-2*zeta_0s(s)*h/a)); c = c - c0(s)*coeffs(s);
p = p + k2 * (zeta_0s(s)*exp(-x_0s(s))/((zeta_0s(s)^2+X^2)*(besselj(0,zeta_0s(s))^2))) * (1-(1+x_0s(s))*exp(-x_0s(s))) * (zeta_0s(s) + X - (zeta_0s(s)-X)*exp(-2*zeta_0s(s)*h/a)) / ((zeta_0s(s)+X)^2-(zeta_0s(s)-X)^2*exp(-2*zeta_0s(s)*h/a)); p = p + (1 - exp(-y0(s)))*coeffs(s);
end end
c = c + SV;
p = p + SV*w^2/2 - c*w^2/2;
end end
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
% FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w) % FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
% %
% A function for Matlab which computes the approximate paraboloid for a % A function for Matlab which computes the approximate paraboloid for a
% thermal lens: % thermal lens caused by heating from a laser beam absorbed in the coating
% or substrate.
%
% Currently only valid for LG00 incident beam.
% %
% coeffs: Coefficients for expansion of thermal lens in terms of bessel % coeffs: Coefficients for expansion of thermal lens in terms of bessel
% functions. % functions.
...@@ -25,7 +28,10 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w) ...@@ -25,7 +28,10 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
num_terms = length(coeffs); num_terms = length(coeffs);
% Calculating bessel zeros % Calculating bessel zeros
zeta_0s = FT_bessel_zeros(0,X,num_terms); zeta_0 = FT_bessel_zeros(0,X,num_terms);
y0 = zeta_0.^2*w^2/(8*a^2);
c0 = -2/w^2*exp(-y0).*y0;
% Initial coefficients % Initial coefficients
c = 0; c = 0;
...@@ -34,11 +40,12 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w) ...@@ -34,11 +40,12 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
% Calculating approximate parabaloid parameters % Calculating approximate parabaloid parameters
for s=1:num_terms for s=1:num_terms
c = c - 1/(4*a^2) * coeffs(s) * zeta_0s(s)^2 * exp(-zeta_0s(s)^2*w^2/(8*a^2)); c = c + c0(s)*coeffs(s);
p = p + coeffs(s) * (1+zeta_0s(s)^2*w^2/(8*a^2)) * exp(-zeta_0s(s)^2*w^2/(8*a^2)); p = p + exp(-y0(s))*coeffs(s);
end end
p = p - c*w^2/2;
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment