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 13, 2017
1 parent 959289e commit 7e427e1
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion README.md
@@ -1,2 +1,72 @@
# ME3255_Final_Project
ME 3255 Final Project

# Part A
```matlab
function [w] = membrane_solution3(T,P)
% T = Tension (microNewton/micrometer)
% P = Pressure (MPa)
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)')
% Membrane displacement is shown on chart
end
```


# Part B
```matlab
% Part B Script
[w] = membrane_solution3(0.006,0.001);
```
![](https://github.uconn.edu/ltd13002/ME3255_Final_Project/blob/master/Part%20B/PartBFigure.png)


# Part C
```matlab
function [w] = membrane_solution(T,P,n)
% T = Tension (microNewton/micrometer)
% P = Pressure (MPa)
% n = # of interior nodes
od = ones(n^2-1,1);
od(n:n:end) = 0;
k = -4*diag(ones(n^2,1))+diag(ones((n^2)-n,1),n)+diag(ones((n^2)-n,1),-n)+diag(od,1)+diag(od,-1);
y = -(10/(n+1))^2*(P/T)*ones(n^2,1);
w = k\y;
% Solves for displacement (micrometers)
% Output w is a vector
% Solution represents a 2D data set w(x,y)
[x,y] = meshgrid(0:10/(n+1):10,0:10/(n+1):10);
z = zeros(size(x));
z(2:end-1,2:end-1) = reshape(w,[n n]);
surf(x,y,z)
title('Membrane Displacement')
zlabel('Displacement (micrometer)')
% Membrane displacement is shown on chart
end
```


# Part D
```matlab
% Part D Script
[w] = membrane_solution(0.006,0.001,10)
```
![](https://github.uconn.edu/ltd13002/ME3255_Final_Project/blob/master/Part%20D/PartDFigure.png)

0 comments on commit 7e427e1

Please sign in to comment.