Skip to content
Permalink
master
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
function [pw_se,w]=SE_diff(T,P,n)
% SE_diff: difference between strain energy and work done by pressure in
% membrane
% [pw_se,w]=SE_diff(T,P,n)
% input:
% T = Tension (microNewton/micrometer)
% P = Pressure (MPa)
% n = number of rows and columns of interior nodes
% output:
% pw_se = difference between strain energy and work done by pressure in
% membrane
% w = vector of displacement of interior nodes
E = 1000000; %TPa Units may need to be changed
v = .31; %Poissons ratio
t = .0003; %um
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(sum(wbar.*h^2.*P));
dwdx = zeros(num);
dwdy = zeros(num);
for i = 1:num
for j = 1:num
dwdx(i,j) = mean([z(i+1,j)-z(i,j),z(i+1,j+1)-z(i,j+1)])./h;
dwdy(i,j) = mean([z(i,j+1)-z(i,j),z(i+1,j+1)-z(i+1,j)])./h;
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;