home
 
 
 
Molecule Building Forces
<?php
											 
											/*
												Molecule Building Forces
												© Charles Chandler
												http://qdl.scs-inc.us/?top=17079
											*/
											 
											define('e_c',  1.60217657 * pow(10, -19)); // elementary charge, in coulombs
											define('e_kg', 9.10938291 * pow(10, -31)); // mass of electron, in kilograms
											define('p_kg', 1.67262178 * pow(10, -27)); // mass of proton, in kilograms
											 
											function Electricity_n($c1_e, $c2_e, $dist_m) {
											// Given two quantities of elementary charges, and the distance between
											// them (in meters), this returns the electric force (in Newtons).
											$c1 = $c1_e * e_c; // convert elementary charges to coulombs
											$c2 = $c2_e * e_c; // convert elementary charges to coulombs
											return (8.9875517873681764 * pow(10, 9) * $c1 * $c2) / ($dist_m * $dist_m);
											}
											 
											function Gravity_n($m1_kg, $m2_kg, $dist_m) {
											// Given two masses (in kilograms), and the distance between them
											// (in meters), this returns the gravitational force (in Newtons).
											return (6.67408 * pow(10, -11) * $m1_kg * $m2_kg) / ($dist_m * $dist_m);
											}
											 
											// By convention, positive force is repulsive, and negative is attractive.
											$v['+ion to near electron' ] = -Electricity_n(1, 1, 279 / 1e12);
											$v['+ion to helium nucleus'] =  Electricity_n(1, 2, 310 / 1e12);
											$v['+ion to far electron'  ] = -Electricity_n(1, 1, 341 / 1e12);
											 
											$v['net electrostatic attraction'] = // -1.4647704356535E-10
											$v['+ion to near electron'   ] + // -2.9638331557537E-9
											$v['+ion to helium nucleus'  ] + //  4.8014097123211E-9
											$v['+ion to far electron'    ];  // -1.9840536001327E-9
											 
											$v['+ion to near electron (gravity)' ] = Gravity_n(p_kg, e_kg,     279 / 1e12);
											$v['+ion to helium nucleus (gravity)'] = Gravity_n(p_kg, p_kg * 4, 310 / 1e12);
											$v['+ion to far electron (gravity)'  ] = Gravity_n(p_kg, e_kg,     341 / 1e12);
											 
											$v['net gravitational attraction'        ] = // 7.7740147419448E-45
											$v['+ion to near electron (gravity)' ] + // 1.3063805538415E-48
											$v['+ion to helium nucleus (gravity)'] + // 7.7718338421773E-45
											$v['+ion to far electron (gravity)'  ];  // 8.745192137286E-49
											 
										?>

Powered by Quick Disclosure Lite
© 2010~2021 SCS-INC.US