Skip to content
Permalink
a59d83a583
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
34 lines (33 sloc) 757 Bytes
function [pw_se,w]=SE_diff(T,P,n)
E = 1e12; %Pa
v = .31;
t = .3; %nm
h = 10/(n+1); %nm
w = membrane_solution(T,P,n);
z = zeros(n+2);
z(2:end-1,2:end-1) = reshape(w,[n n]);
num = n + 1;
wbar = zeros(num);
for i = 1:num
for j = 1:num
wbar(i,j) = mean([z(i,j),z(i+1,j),z(i,j+1),z(i+1,j+1)]);
end
end
pw = sum(wbar.*h^2.*P);
dwdx = zeros(num);
dwdy = zeros(num);
% for i = 1:num
% for j = 1:num
% dwdx(j,i) = z(i+1,j)-z(i,j);
% dwdy(j,i) = z(i,j+1)-z(i,j);
% end
% end
dwdx(:,1) = wbar(:,2)-wbar(:,1);
for i = 2:n
dwdx(:,3) = wbar(:,n+1)-wbar(:,n-1);
end
% dwdx(:,4) = wbar(:,4)-wbar(:,3);
dwdy(1,:) = wbar(2,:)-wbar(1,:);
dwdy(2,:) = wbar(3,:)-wbar(1,:);
dwdy(3,:) = wbar(4,:)-wbar(2,:);
%se = E*t*h^2/(2*(1-v^2));