Skip to content
Permalink
1c8de35a81
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
75 lines (56 sloc) 1.33 KB

ME3255_FInalProject

I noticed that I was never assigned to a group so I did this project solo

Part A

function [w] = membrane_solution3(T,P)


    od = ones(8,1);
    od(3:3:end) = 0;
    a = -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 = a\y;

grid on
    [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')
    xlabel('X (\muM)')
    ylabel('Y (\muM)')
    zlabel('Displacement (\muM)')
    colormap jet
    shading interp
    disp(w)

end

Part B

membrane_solution3(0.006,0.001)

Part C

function [w] = membrane_solution3(T,P)


    od = ones(8,1);
    od(3:3:end) = 0;
    a = -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 = a\y;

grid on
    [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')
    xlabel('X (\muM)')
    ylabel('Y (\muM)')
    zlabel('Displacement (\muM)')
    colormap jet
    shading interp
    disp(w)

end

Part D

membrane_solution(0.006,0.001,10)