Recent content by gibatom

  1. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Hello, Did anyone have the time to look at my code ?
  2. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Here is the missing code : from math import * from numpy import * from random import * import matplotlib.pyplot as plt N=4 #number of atoms in the gas #using natural units masse=1 #mass of an atom dt=0.01 #time discretization re = 2**(1/6) # equilibrum distance of the gas length = 10 #...
  3. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    It's just a normal text file. I am trying what you said : from math import * from numpy import * from random import * import matplotlib.pyplot as plt N=4 #number of atoms in the gas #using natural units masse=1 #mass of an atom dt=0.01 #time discretization re = 2**(1/6) # equilibrum distance...
  4. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Yes it should be possible if we consider that the atoms in the box interacts with fictive atoms around the box, who are images of the atoms in the box. I also plan to modelize the rebounds on the box as you suggest and yes, indeed, working with a circle box is a good idea as it should help to...
  5. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    I tried to attach it on the discussion but the forum won't publish it altough it seems to work when i try to upload it. Do you know how i can fix it ?
  6. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Here is my code. I translated almost everything into english but i let some variables in french if they are understandable (like "masse" for mass for example). I tried to make helpful commentaries as well to facilitate your reading of the code but if something is still unclear in my code, please...
  7. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Thank you very much DrClaude for your answer. Sorry, reading your answer, i realize i was not accurate enough describing my code. I effectively use the image of the atoms as you proposed, and calculate the interactions between those atoms and the ones on the box, only if the distance is less...
  8. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Thank you for your answer BvU. Yes i am new here, i am not still used to the functioning of the forum: i solemnly promise to read the PF guidelines :smile: Sorry for the unclearness, i will give more details in my answers to DrClaude if you want to read it. I already identified a problem...
  9. gibatom

    Simulation of a gas in 2-D using a Verlet algorithm

    Verlet Algorithm with periodic conditions
Back
Top