Skip to content
Permalink
33304d2abe
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
27 lines (26 sloc) 629 Bytes
function [pw_se,w]=SE_diff(T,P,n)
E = 1e6;
v = .31;
t = .0003;
h = 10/(n+1);
w = membrane_solution(T,P,n);
z = zeros(n+2);
z(2:end-1,2:end-1) = reshape(w,[n n]);
nt = n + 1;
wn = zeros(nt);
for i = 1:nt
for j = 1:nt
wn(i,j) = mean([z(i,j),z(i+1,j),z(i,j+1),z(i+1,j+1)]);
end
end
pw = sum(sum(wn.*h^2.*P));
dwdx = zeros(nt);
dwdy = zeros(nt);
for i = 1:nt
for j = 1:nt
dwdx(i,j) = mean([z(i+1,j)-z(i,j),z(i+1,j+1)-z(i,j+1)]);
dwdy(i,j) = mean([z(i,j+1)-z(i,j),z(i+1,j+1)-z(i+1,j)]);
end
end
se = E*t*h^2/(2*(1-v^2))*sum(sum(0.25.*dwdx.^4+.25.*dwdy.^4+0.5.*(dwdx.*dwdy).^2));
pw_se = pw-se;