-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_ref.m
29 lines (20 loc) · 875 Bytes
/
get_ref.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% GET_REF Calculates fluence regime transition temperature and fluence.
% This function takes a property struct and outputs the reference or
% transition fluence (Fref) and temperature (Tref).
%
% Author: Timothy Sipkens
%=========================================================================%
function [Tref, Fref] = get_ref(prop)
% function to minimize to solve for Tref
min_fun = @(Tref) norm(...
2*prop.hvb/prop.Rs+...
Tref.*lambertw(-1,-prop.C1.*(prop.dp.*(Tref-prop.Tg)./prop.tlp).^2)...
);
% optimization to find reference temperature
T0 = 3000; % starting point for minimizer, K
Tref = fminsearch(min_fun,T0); % calculate reference temperature, K
% reference fluence from reference temperature
Fref = prop.l_laser * prop.rho * prop.cp * ...
(Tref-prop.Tg) / (6*pi*prop.Eml) / ...
10000; % /10000 converts fluence to J/cm^2
end