Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    2
    ReputationRep:
    The problem is to find the intersection of two straight lines.

    Namely, im working out the critical currenty density of corrosion in metal. But in any case, its a matter of solving for 1 unknown and I need your help.

    Equations:
    Vf1=Vf+Bflog(ic/if)
    Vh1=Vh+Bhlog(ic/ih)

    where,
    Vf=-0.44
    Bf=0.10
    if=10exp-8
    Vh=0
    Bh=-0.08
    ih=10exp-10

    and we need to find ic,

    can anyone help?
    • Thread Starter
    Offline

    2
    ReputationRep:
    :confused: anyone?
    Offline

    2
    ReputationRep:
    Try the Maths forum

    http://www.thestudentroom.co.uk/forumdisplay.php?f=38
    Offline

    15
    ReputationRep:
    have you actually written anything in matlab so far?
    Offline

    14
    ReputationRep:
    Give me a minute to do this.

    And 10 mins to load matlab on my laptop
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by Nick Longjohnson)
    Give me a minute to do this.

    And 10 mins to load matlab on my laptop
    :yy:
    Offline

    14
    ReputationRep:
    (Original post by Peace0fM1nd)
    :yy:
    What range of ic are we looking at?
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by didgeridoo12uk)
    have you actually written anything in matlab so far?
    YEs, but need more practice. i realised how i could use matlab to help me solve some corrosion problems, so im like using it on my own initiative - but i quickly found out how much practice i still need!! plus its amazing how many uses matlab actualy has!
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by Nick Longjohnson)
    What range of ic are we looking at?
    10exp-4<ic>10exp4 (on logarithmic scale)
    Offline

    14
    ReputationRep:
    (Original post by Peace0fM1nd)
    10exp-4<ic>10exp4 (on logarithmic scale)
    My drunk/tired ass is having difficulty doing them now.

    Im thinking of just making a function of Vf1-Vh1, and then using the fzero function to find where the difference is zero


    Edit: I just plotted it to check, and it doesnt seem to cross within that range, unless im doing something wrong :s
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by Nick Longjohnson)
    My drunk/tired ass is having difficulty doing them now.

    Im thinking of just making a function of Vf1-Vh1, and then using the fzero function to find where the difference is zero
    If it helps, i know that critical current density log(ic)= -2.446, i need to visualise the solution and. y axis will show V, x axis whill show ic. thanks for your help dude
    Offline

    14
    ReputationRep:
    (Original post by Peace0fM1nd)
    If it helps, i know that critical current density log(ic)= -2.446, i need to visualise the solution and. y axis will show V, x axis whill show ic
    I just did this to plot it, and it doesnt seem to cross (called if idotf so it doesnt interpret it as an 'if' statement :P):

    Spoiler:
    Show
    clear

    Vf=-0.44;
    Bf=0.10;
    idotf=10^(-8);
    Vh=0;
    Bh=-0.08;
    ih=10^(-10);

    ic=linspace(10^(-4),10^4,10000);
    Vf1=Vf+Bf*log(ic/idotf);
    Vh1=Vh+Bh*(log(ic/ih));

    plot(ic,Vf1,ic,Vh1)
    xlim([0 0.01])


    Fzero is saying it goes into complex numbers:


    root = fzero(@(ic)((-0.44+0.1*log(ic/(10^(-8))))-(0.08*log(ic/(10^(-10))))),0.01)


    be advised: I havnt done matlab in a while and am very tired
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by Nick Longjohnson)
    I just did this to plot it, and it doesnt seem to cross (called if idotf so it doesnt interpret it as an 'if' statement :P):

    Spoiler:
    Show
    clear

    Vf=-0.44;
    Bf=0.10;
    idotf=10^(-8);
    Vh=0;
    Bh=-0.08;
    ih=10^(-10);

    ic=linspace(10^(-4),10^4,10000);
    Vf1=Vf+Bf*log(ic/idotf);
    Vh1=Vh+Bh*(log(ic/ih));

    plot(ic,Vf1,ic,Vh1)
    xlim([0 0.01])


    Fzero is saying it goes into complex numbers:


    root = fzero(@(ic)((-0.44+0.1*log(ic/(10^(-8))))-(0.08*log(ic/(10^(-10))))),0.01)


    be advised: I havnt done matlab in a while and am very tired
    LOL. in any case, thanks for your help. its not how the graph should appear, but i'l work on your script and see what i can do. :cool:
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Did TEF Bronze Award affect your UCAS choices?
    Useful resources
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.