Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 39

Thread: Engineering

  1. #16
    Join Date
    Nov 2006
    Location
    Aberdeen
    Posts
    2,975
    Quote Originally Posted by Klemmel View Post
    function [X,x]=laplace(n,xn,xs,xe,xw)

    tol = 10e-10;
    h = 1/(n+1);
    x = 0:h:1;
    X = zeros(n+2,n+2);
    Xgammel = zeros(n+2,n+2);

    X(n+2,1:n+2) = xn;
    X(1,1:n+2) = xs;
    X(1:n+2,1) = xe;
    X(1:n+2,n+2) = xw;



    while max(max(abs(X-Xgammel)))>tol
    Xgammel = X;
    for i=2:n+1
    for j=2:n+1
    X(i,j) = (X(i+1,j)+X(i-1,j)+X(i,j+1)+X(i,j-1))/4;
    end
    end
    end

    Don't you just love MATLAB?
    one i made recently for finite element

    % ______ __ ___ ___ ____ ___ __
    % | | | \ \ / | | | | | | |\ |
    % |____| | \ \ / |__ | | | | | | \ |
    % | | | / \ / | | | | | | | \ | /\./\
    % | | |_/ \/ |__ |__ | _|_ |__| | \| . | | |
    %
    % Rev.1 09:00 09-Feb-07
    % Rev.2 09:00 23-Feb-07
    %------------------------------- Variables -------------------------------%
    % u =
    % f =
    % dx =
    % L =
    % T =
    % Cr =
    % A =
    % t =
    % x =
    % --------------------------------- setup ------------------------------- %
    clear;clc
    u = 5;
    f = 0.01;
    dx = 1;
    L = 20;
    T = 20;
    Cr = 0.8;
    % Courant number
    dt = (dx*Cr)/u;
    t = [1:dt:T];
    x = [1:dx:L];
    A = 5;
    c=5;
    g=9.81;
    % -------------------------------- PERIODIC ----------------------------- %

    % ------------------------------ Lax scheme ----------------------------- %

    HLAX = zeros(1,length(x));
    VLAX = zeros(1,length(x));
    for i = 1:length(t)
    HLAX(i,1) = A*sin(2*pi*f*(t(i)));
    VLAX(i,1) = A*sin(2*pi*f*(t(i)));
    end
    for i = 2:length(t)
    for j = 2:length(x)-1
    HLAX(i,j) = 0.5*(HLAX(i-1,j+1) + HLAX(i-1,j-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(VLAX(i-1,j+1) - VLAX(i-1,j-1));
    VLAX(i,j) = 0.5*(VLAX(i-1,j+1) + VLAX(i-1,j-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(HLAX(i-1,j+1) - HLAX(i-1,j-1));
    end
    HLAX(i,length(x)) = 0.5*(HLAX(i-1,length(x)) + HLAX(i-1,length(x)-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(VLAX(i-1,length(x)) - VLAX(i-1,length(x)-1));
    VLAX(i,j) = 0.5*(VLAX(i-1,length(x)) + VLAX(i-1,length(x)-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(HLAX(i-1,length(x)) - HLAX(i-1,length(x)-1));
    end
    figure(1)
    surf(x,t,VLAX)



    % -------------------------------DISCONTINUOS --------------------------- %

    % ------------------------------ Lax scheme ----------------------------- %

    HLAX = zeros(1,length(x));
    VLAX = zeros(1,length(x));
    for i = 1:length(t);
    if i < 6;
    HLAX(i,1) = 0;
    VLAX(i,1) = 0;
    elseif i >= 6;
    HLAX(i,1) = 5;
    VLAX(i,1) = 0;
    end
    end
    for i = 2:length(t)
    for j = 2:length(x)-1
    HLAX(i,j) = 0.5*(HLAX(i-1,j+1) + HLAX(i-1,j-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(VLAX(i-1,j+1) - VLAX(i-1,j-1));
    VLAX(i,j) = 0.5*(VLAX(i-1,j+1) + VLAX(i-1,j-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(HLAX(i-1,j+1) - HLAX(i-1,j-1));
    end
    HLAX(i,length(x)) = 0.5*(HLAX(i-1,length(x)) + HLAX(i-1,length(x)-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(VLAX(i-1,length(x)) - VLAX(i-1,length(x)-1));
    VLAX(i,j) = 0.5*(VLAX(i-1,length(x)) + VLAX(i-1,length(x)-1)) - ...
    (((c^2)*dt)/(2*g*dx))*(HLAX(i-1,length(x)) - HLAX(i-1,length(x)-1));
    end
    figure(2)
    surf(x,t,VLAX)

    great a legitimate excuse for matlab on UCP
    autozine.org

  2. #17
    Join Date
    Jul 2003
    Location
    Northampton, Pennsylvania
    Posts
    7,989
    Here's some advanced math for y'all.

    [O o)O=\x/=O(o O]

    The things we do for girls who won't sleep with us.

    Patrick says:
    dads is too long so it wont fit
    so i took hers out
    and put mine in

  3. #18
    Join Date
    Jun 2003
    Location
    UK
    Posts
    7,272
    O.K. then;

    The maximum allowable working pressure based on inter-stiffener strength is given by:

    P
    a = Pcη where η = 0.80

    P
    c = Pm/2 if Pm/Py ≤ 1
    P
    c = Py[1-Py/(2Pm)] if 1 < Pm/Py ≤ 3
    P
    c = 5/6Py if Pm/Py > 3

    where

    P
    m = (2.42E[t/(2R)]^5/2)/((1-v^2)^3/4[L/(2R)-0.45(t/(2R))^1/2])

    P
    y = (σyt/R)/(1-F)


    For unstiffened cylinders F = 0

    R = mean radius (1.5m)

    L = length (1m)


    t = shell thickness

    E = Modulus of Elasticity

    v = Poisson's ratio

    σy = specified minimum yield point or yield strength

    If Pa = 1.65e+7 Pa

    Find t

    You can choose any material you want, so long as it is transparent and as light as possible.

    If I've missed anything vital out, let me know.

    TIA

  4. #19
    Join Date
    Nov 2006
    Location
    Aberdeen
    Posts
    2,975
    thats buckling using principal stresses isnt it? or at least stiffener calculations for unstiffend (conical?) shells. I generally use this pdf to go through that design procedure as a whole.

    I guess if you choose plastic you would need a data sheet showing E, v etc. If you use steel (easier to assume E=210 GPa, v=0.3) it will be easier. can you explain the P subscripts (axial?radial?hoop?), i know y is yield isnt it?

    When it comes down to it, it will be a simultaneous equation i assume
    Attached Files Attached Files
    autozine.org

  5. #20
    Join Date
    Jun 2003
    Location
    UK
    Posts
    7,272
    Quote Originally Posted by jediali View Post
    thats buckling using principal stresses isnt it? or at least stiffener calculations for unstiffend (conical?) shells.
    Cylindrical, conical ones are even more fun.

    Quote Originally Posted by jediali View Post
    can you explain the P subscripts (axial?radial?hoop?)
    P
    a = maximum allowable pressure for any failure mode
    P
    c = cylinder inter-stiffener limit pressure
    P
    m = von Mises buckling pressure for a cylinder
    P
    y = yield pressure at midbay and midplane of a cylinder

    I know what I ended up with, I want to see if anyone can do better.

    I seem to recall I ended up with about 5 tonnes of acrylic or something.


  6. #21
    Join Date
    Jun 2006
    Location
    in a house
    Posts
    1,264
    okay uhh, im regretting including "computers" in my first post now

    ahem anyone can help me out with some 1st yr maths stuff?
    Attached Images Attached Images
    it was actually me who killed vasilli zaitsev, heinz thorwald, carlos hatchcock, and simo hayha

  7. #22
    Join Date
    Jun 2006
    Location
    in a house
    Posts
    1,264
    uhh the latter part of the question is simple, just i dont really UNDERSTAND what they need in the first part
    it was actually me who killed vasilli zaitsev, heinz thorwald, carlos hatchcock, and simo hayha

  8. #23
    Join Date
    Mar 2004
    Location
    Eindhoven, The Netherlands
    Posts
    7,833
    Quote Originally Posted by Klemmel View Post
    laplace
    We are just getting this on school here. Honestly noone in the class understands it.. Not the thing someone likes to do on a early friday morning with 9/10 times a hangover

    Matlab is something they assume we have been learned, which we haven't. As you can imagine noone understands it as such and we regularly steal assignments from 3rd year students. Offcourse we said it to teachers more than once, but nothing is done, like a training or something. I'm trying to catch up on my own now, using a training put on our server three years ago...

    This is a picture of where I usually spend my coffee time. Working on my laptop on a bench in the fresh air. If you look very closely in real life you can still see where the German bullets hit in WW2.


  9. #24
    Join Date
    Mar 2005
    Location
    No(r)way.
    Posts
    2,467
    Quote Originally Posted by drakkie View Post
    We are just getting this on school here. Honestly noone in the class understands it.. Not the thing someone likes to do on a early friday morning with 9/10 times a hangover

    Matlab is something they assume we have been learned, which we haven't. As you can imagine noone understands it as such and we regularly steal assignments from 3rd year students. Offcourse we said it to teachers more than once, but nothing is done, like a training or something. I'm trying to catch up on my own now, using a training put on our server three years ago...

    This is a picture of where I usually spend my coffee time. Working on my laptop on a bench in the fresh air. If you look very closely in real life you can still see where the German bullets hit in WW2.

    Thats a surprise coming from you.

  10. #25
    Join Date
    Mar 2004
    Location
    Eindhoven, The Netherlands
    Posts
    7,833
    Quote Originally Posted by LotusLocost View Post
    Thats a surprise coming from you.
    As if you never stole a piece of candy from the jar, "Mr. Perfect".

    In my case here it is not really stealing. About a third of the sums are associated with your own student number. Say 5 x n1 = answer. n1 = the last number of your student number. And we always pay them for their efforts in beer. It's just a thing that happens on schools. Live with it.
    Last edited by drakkie; 10-07-2007 at 04:08 AM.

  11. #26
    Join Date
    Jun 2006
    Location
    in a house
    Posts
    1,264
    yet another hard to understand question... just matrix manipulation but WHAT ARE THEY ASKING UGH!
    Attached Images Attached Images
    it was actually me who killed vasilli zaitsev, heinz thorwald, carlos hatchcock, and simo hayha

  12. #27
    Join Date
    Jun 2006
    Posts
    42
    What is matlab?
    I LIKE CARS

  13. #28
    Join Date
    Jun 2006
    Location
    in a house
    Posts
    1,264
    ^matlab is a program made by a bunch of students from UW... models math shit

    why wont anyone help me
    it was actually me who killed vasilli zaitsev, heinz thorwald, carlos hatchcock, and simo hayha

  14. #29
    Join Date
    Aug 2006
    Location
    Maryland, USA
    Posts
    2,038
    This thread makes me glad I didn't go to college.
    Go n-ithe an cat thu, is go n-ithe an diabhal an cat

    When you go Home, Tell them for us and say 'For your tommorrow, We Gave Our Today.'

  15. #30
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    11,391
    Quote Originally Posted by Mr.Tiv View Post
    This thread makes me glad I didn't go to college.
    I see great things in your future.

    He came dancing across the water
    With his galleons and guns
    Looking for the new world
    In that palace in the sun
    On the shore lay Montezuma
    With his cocoa leaves and pearls

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My first year of Automotive Engineering
    By drakkie in forum Miscellaneous
    Replies: 13
    Last Post: 07-27-2007, 08:56 PM
  2. Ford US announces massive plan regarding Ford Australia
    By fpv_gtho in forum General Automotive
    Replies: 112
    Last Post: 05-18-2006, 07:46 PM
  3. GDT Speedster
    By Vaigra in forum Matt's Hi-Res Hide-Out
    Replies: 9
    Last Post: 04-10-2006, 03:53 AM
  4. Replies: 15
    Last Post: 11-18-2004, 11:58 AM
  5. Replies: 2
    Last Post: 10-21-2004, 08:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •