forked from topggp/GGP-Matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_updateM.m
44 lines (44 loc) · 1.52 KB
/
model_updateM.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%-------------------------------------------------------------
% This is the file model_updateM.m
%
% Version Nov 2019.
% Simone Coniglio <simone.coniglio@airbus.com>
% Propulsion Airframe Stress Transverse,
% 31300 Toulouse, France.
%
function [E,dE_ddelta,dE_dm]=model_updateM(delta,p,X)
%update the Young Modulus on the base of delta
m=X(6:6:end);
nc=length(m);
m=repmat(m(:),1,size(delta,2));
switch p.method
case 'MMC'
E=p.E0*delta;
dE_ddelta=p.E0*ones(size(delta));
dE_ddelta=repmat(dE_ddelta,size(m,1),1);
dE_dm=0*m;
case 'GP'
hatdelta=delta.*m.^p.gammac;
[E,dE_dhatdelta]=Aggregation_Pi(hatdelta,p);
if p.saturation
[E,ds]=smooth_sat(E,p,nc);
dE_dhatdelta=ds.*dE_dhatdelta;
end
E=E.*p.E0;
dhatdelta_ddelta=m.^p.gammac;
dhatdelta_dm=p.gammac*delta.*m.^(p.gammac-1);
dE_ddelta=p.E0*dhatdelta_ddelta.*dE_dhatdelta;
dE_dm=p.E0*dE_dhatdelta.*dhatdelta_dm;
case 'MNA'
hatdelta=delta.*m.^p.gammac;
[rho,drho_dhatdelta]=Aggregation_Pi(hatdelta,p);
if p.saturation
[rho,ds]=smooth_sat(rho,p,nc);
drho_dhatdelta=ds.*drho_dhatdelta;
end
E=rho.^p.penalty.*(p.E0-p.Emin)+p.Emin;
dhatdelta_ddelta=m.^p.gammac;
dhatdelta_dm=p.gammac*delta.*m.^(p.gammac-1);
dE_ddelta=p.penalty*(p.E0-p.Emin)*dhatdelta_ddelta.*drho_dhatdelta.*rho.^(p.penalty-1);
dE_dm=p.penalty*(p.E0-p.Emin)*dhatdelta_dm.*drho_dhatdelta.*rho.^(p.penalty-1);
end