Message Boards Message Boards

0
|
629 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Calculate gravity exerted on a line of atoms

Posted 1 month ago

Hi there,

Just for a bit of fun, I wanted to write a notebook to take a line of hydrogen atoms and calculate the gravity exerted on each atom by all the other atoms in the line. I'd like to add as many quantum or other effects as possible to make it as accurate as possible. Any suggestions/help would be really appreciated. The code I have so far is:

(* Set up the parameters *)
G = 6.6743*10^-11;(* Gravitational constant in m ^ 3 kg ^ -1 s ^ -2 *)
m = 1.6737236*10^-27;(* Mass of a hydrogen atom in kg *)
r = 1*10^-10;(* Assumed distance between atoms in m *)
numAtoms = 101;(* Number of atoms *)

(* Calculate the gravitational force on each atom *)
forces = Table[
     G*m^2*Sum[
         If[i == j, 0, Sign[i - j]/(r*Abs[i - j])^2],
         {j, 1, numAtoms}
       ],
     {i, 1, numAtoms}
   ];

(* Plot the forces *)
ListLinePlot[forces, 
 AxesLabel -> {"Atom number", "Gravitational force (N)"}]
POSTED BY: S G
Posted 1 month ago

Maybe this is too complex of a problem to model accurately? Just thinking, does Mathematica have any detailed models of a single atom? Maybe this should be the first step - to build a detailed gravity model of a single atom?

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract