Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
ltd13002 committed Dec 15, 2017
1 parent 0221c79 commit af2c716
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions README.md
Expand Up @@ -11,25 +11,32 @@ function [w] = membrane_solution3(T,P)
% P = Pressure (MPa)
% output:
% w = vector of displacement of interior nodes
od = ones(8,1);
od(3:3:end) = 0;
k = -4*diag(ones(9,1))+diag(ones(9-3,1),3)+diag(ones(9-3,1),-3)+diag(od,1)+diag(od,-1);
y = -(10/4)^2*(P/T)*ones(9,1);
w = k\y;
% Solves for displacement (micrometers)
% Output w is a vector
% Solution represents a 2D data set w(x,y)
od = ones(8,1);
od(3:3:end) = 0;
k = -4*diag(ones(9,1))+diag(ones(9-3,1),3)+diag(ones(9-3,1),-3)+diag(od,1)+diag(od,-1);
y = -(10/4)^2*(P/T)*ones(9,1);
w = k\y;
% Solves for displacement (micrometers)
% Solution represents a 2D data set w(x,y)
[x,y] = meshgrid(0:10/4:10,0:10/4:10);
z = zeros(size(x));
z(2:end-1,2:end-1) = reshape(w,[3 3]);
surf(x,y,z)
title('Membrane Displacement')
zlabel('Displacement (micrometer)')
title('Membrane Displacement (3 x 3)')
zlabel('Z Position (micron)')
ylabel('Y Position (micron)')
xlabel('X Position (micron)')
% Membrane displacement is shown on chart
% Membrane displacement is shown on chart
end
end
```
Expand Down

0 comments on commit af2c716

Please sign in to comment.