Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (52 sloc) 2.04 KB
%% Copyright 2014 MERCIER David
function model_gao(OPTIONS)
%% Function used to calculate Young's modulus in bilayer system with
% the model of Gao et al. (1992) (for flat cylindrical indentation test...)
% see also Hay et al. (2011)
% Errors for phigao0 in Fischer-Cripps "Nanoindentation 2nd Ed.".
gui = guidata(gcf);
x = gui.results.t_corr./gui.results.ac;
x = checkValues(x);
gui.data.phigao1 = phi_gao_1(x);
% Poisson's coefficient of the composite (film + substrate)
gui.data.nuc = composite_poissons_ratio(gui.data.nus, gui.data.nuf, ...
gui.data.phigao1);
gui.data.phigao0 = phi_gao_0(x, gui.data.nuc);
bilayer_model = @(Ef_red_sol, x) ...
(1e-9*((((1e9*Ef_red_sol)-gui.data.Es_red) .* ...
gui.data.phigao0)+gui.data.Es_red));
% Make a starting guess
gui.results.A0 = gui.data.Ef_red;
if gui.config.licenceOpt_Flag
[gui.results.Ef_red_sol_fit, ...
gui.results.resnorm, ...
gui.results.residual, ...
gui.results.exitflag, ...
gui.results.output, ...
gui.results.lambda, ...
gui.results.jacobian] =...
minimizationProcess(bilayer_model, gui.results.A0, x, ...
gui.results.Esample_red, ...
gui.config.numerics.Min_YoungModulus, ...
gui.config.numerics.Max_YoungModulus, ...
OPTIONS);
else
model = @LMS;
gui.results.Ef_red_sol_fit = fminsearch(model, gui.results.A0, OPTIONS);
warning('No Optimization toolbox available !');
end
function [sse, FittedCurve] = LMS(params)
Ef_red_sol(1) = params(1);
FittedCurve = (1e-9*((((1e9*Ef_red_sol)-gui.data.Es_red) .* ...
gui.data.phigao0)+gui.data.Es_red));
gui.results.residual = FittedCurve - gui.results.Esample_red;
sse = sum(gui.results.residual .^ 2);
end
gui.results.Em_red = 1e-9 * ...
((((1e9*gui.results.Ef_red_sol_fit) - gui.data.Es_red) .* ...
gui.data.phigao0) + gui.data.Es_red);
gui.results.Ef_red = 1e-9 * ...
((((1e9.*gui.results.Esample_red)-gui.data.Es_red) ./ ...
gui.data.phigao0) + gui.data.Es_red);
guidata(gcf, gui);
end
You can’t perform that action at this time.