1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lennard-Jones Force Formula Python Program

  1. Dec 10, 2012 #1
    I'm not looking for the answer, I just want some help with understanding the question. The main thing I'm stuck on is the characteristic binding energy and the characteristic molecular size. I've tried searching for these but I'm finding a lot of different stuff.

    1. The problem statement, all variables and given/known data
    All to be done in Python.
    physforumsq.jpg

    2. Relevant equations

    F = (-24*bind)*(((2.0/r)*(sigma/r)**12) -((1.0/r)*(sigma/r)**6))

    3. The attempt at a solution

    This is what I've done so far. I'm not even sure if the formula function is correct. Because the plot I get begins at a high value fort the Force but falls quickly to zero and remains at zero.

    Code (Text):
    def lgfunc(bind,sigma,r):
        '''
        Function to calculate force between two particles using
        Lennard-Jones formula
        '''
        F = (-24*bind)*(((2.0/r)*(sigma/r)**12) -((1.0/r)*(sigma/r)**6))
       
        return F
     
    #For H2 -
     
    bind = 4.48*1.6e-19
    sigma = 2.92e-10
    r = linspace(0,5e-9,50000)

    plot(r,lgfunc(bind,sigma,r),'r.')

    Any and all help would be greatly appreciated. Thanks
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Lennard-Jones Force Formula Python Program
Loading...