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 @@
% FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,num_terms)
%
% 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).
% 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:
% Z = c*r^2+p
......@@ -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
P = beam.P;
X = mirror.X;
a = mirror.a;
w = beam.w;
% Mirror parameters
alpha = mirror.alpha;
pois = mirror.pois;
Cabs = mirror.Cabs;
K = mirror.K;
a = mirror.a;
h = mirror.h;
X = mirror.X;
Y = mirror.Y;
% Number of terms in expansion
num_terms = length(coeffs);
% Factors
k1 = - alpha*(1+pois)*Cabs*P/(4*pi*a^2*K);
k2 = - alpha*(1+pois)*Cabs*P/(pi*K);
% Calculating bessel zeros
zeta_0 = FT_bessel_zeros(0,X,num_terms);
y0 = zeta_0.^2*w^2/(8*a^2);
% Calculate coefficents
zeta_0s = FT_bessel_zeros(0,X,num_terms);
x_0s = zeta_0s.^2 * w^2 / (8*a^2);
c0 = -2/w^2*exp(-y0).*y0;
% Initial paraboloid parameters
c = 0;
......@@ -47,11 +45,13 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_distortion(beam,mirror,nu
% Calculate parabaloid 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));
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));
c = c - c0(s)*coeffs(s);
p = p + (1 - exp(-y0(s)))*coeffs(s);
end
c = c + SV;
p = p + SV*w^2/2 - c*w^2/2;
end
......@@ -3,7 +3,10 @@
% FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
%
% 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
% functions.
......@@ -25,7 +28,10 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
num_terms = length(coeffs);
% 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
c = 0;
......@@ -34,11 +40,12 @@ function [c,p] = FT_approximate_paraboloid_for_thermal_lens(coeffs,X,a,w)
% Calculating approximate parabaloid parameters
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));
p = p + coeffs(s) * (1+zeta_0s(s)^2*w^2/(8*a^2)) * exp(-zeta_0s(s)^2*w^2/(8*a^2));
c = c + c0(s)*coeffs(s);
p = p + exp(-y0(s))*coeffs(s);
end
p = p - c*w^2/2;
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment