Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Duffing equation based output

  1. May 22, 2014 #1
    Hi there,
    I am trying to achieve a particular set of graphs based on duffing equation graphs which you can find here: 2ih2p3r.jpg

    It shows a graph which is Amplitude (X(1)) vs. Omega graph. With the code that I have deduced and the formula used, I am able to see that X(1) is varying at every step, however the omega value isn't?

    What might be wrong in there? I want it to vary as X changes at every step.

    Code can be found at http://sysden.com/dufing.f

    Here are the first 10 lines of my output:

    1st column is omega, second is X(1), third is F(1) and fourth is F(2)


    Code (Text):
       2.0000000000000000        1.0203714984602674E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.0563376279129973E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.1078731279483987E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.1749503127865479E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.2575390789204062E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.3556069126132030E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.4691188981781366E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.5980377265090756E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.7423237040156399E-003   0.0000000000000000        0.0000000000000000    
       2.0000000000000000        1.9019347618415869E-003   0.0000000000000000        0.0000000000000000    
     
     
  2. jcsd
  3. May 26, 2014 #2

    DrClaude

    User Avatar

    Staff: Mentor

    Why should omega change? You set it equal to 2 at the beginning of your program, and then don't change the value. By what magic would you expect it to be modified?

    In the Duffing equation, ##x## is a function of ##t##, and ##\omega## is a parameter. The "amplitude" you are after is not defined. What does it mean? My guess is that you need to solve for ##x(t)## for a given ##\omega##, calculate something on that ##x(t)## to get the "amplitude", and repeat for different values of ##\omega##.

    And by the way, there is not point in printing F(1) and F(2) in the main program, as you do not have access to those values, which are used internally by ODE2.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Duffing equation based output
  1. File output (Replies: 4)

  2. MIPS Input/Output? (Replies: 1)

  3. PHP - limiting output (Replies: 7)

Loading...