-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetExactSol.asv
More file actions
77 lines (50 loc) · 1.95 KB
/
getExactSol.asv
File metadata and controls
77 lines (50 loc) · 1.95 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function [ ux, uy, Duy, Dux, Duxy ] = getExactSol(x,y, MAT, FORCE, INC )
%assume the body force is fx=0, fy =1, interface = 0.5
E1 = MAT(1);
E2 = MAT(3);
%interface = INC(2);
interface = 0.5;
trac = FORCE(3);
yleft = find(y<interface);
yright = find(y>=interface);
ux = 0;
Dux(yleft)=0;
%Constant body force
%uy(yleft) = (1/E2)*(-(y(yleft).^2/2)+(trac+1).*y(yleft));
%Linear body force distribution
%uy(yleft) = (1/E2)*(-(y(yleft).^3/6)+(y(yleft)/2))+(E1/E2)*(trac*y(yleft));
%Zero body force
%uy(yleft) = (trac/E2)*y(yleft);
%Derivation of exact solution for constant body force
%Duy(yleft) = (1/E2)*(-(y(yleft))+(trac+1));
%derivation of exact solution for linear body force
%Duy(yleft) = (1/E2)*(-(y(yleft).^2/2)+(1/2))+(E1/E2)*trac;
%Derivation of exact solution for zero body force
Duy(yleft) = trac/E2;
Duxy(yleft) = 0; %0.5*(Duy(yleft)+Dux(yleft));
Dux(yright) = 0;
%Constant body force
%uy(yright) = (1/E2)*(-(1/8)+(1/2)*(trac+1))+(1/E1)*(-(y(yright).^2/2)+(trac+1).*y(yright)+(1/8)-(1/2)*(trac+1));
%Linear body force distribution
%uy(yright) = (1/E2)*(-(1/48)+(1/4))+(E1/E2)*(trac/2)+(1/E1)*(-(y(yright).^3/6)+(y(yright)/2))+(trac*y(yright))...
%+(1/E1)*((1/48)-(1/4))-(trac/2);
%Zero body force
uy(yright) = ((0.5*trac)/E2)+(trac/E1)*(y(yright)-0.5);
%Derivation of exact solution for constant body force
%Duy(yright) = (1/E1)*(-y(yright)+(trac+1));
%Derivation of exact solution for linear body force
%Duy(yright) = (1/E1)*(-(y(yright).^2/2)+(1/2))+trac;
%Derivation of exact solution for zero body force
Duy(yright) = trac/E1;
Duxy(yright) = 0; %0.5*(Duy(yright)+Dux(yright));
% if y<interface
%
% ux = 0;
% uy = (1/E2)*(-(y.^2/2)+(trac+1).*y);
% %uy = (trac/E1)*y;
% else
% ux = 0;
% uy = (1/E2)*(-(1/8)+(1/2)*(trac+1))+(1/E1)*(-(y.^2/2)+(trac+1).*y+(1/8)-(1/2)*(trac+1));
% %uy = ((0.5*trac)/E1)+(trac/E2)*(y-0.5);
% end
%uy=uy/4;