'******************************************************** '* Calculate relativistic mass and speed of an electron * '* accelerated in an electron gun * '* ---------------------------------------------------- * '* SAMPLE RUN: * '* * '* Give electron gun voltage in volts: 1E6 * '* * '* Relativistic mass (kg) and speed (m/s): * '* 2.693394E-30 2.8212498E+08 * '* * '* ---------------------------------------------------- * '* Ref.: "Problem Solving with Fortran 90 By David R. * '* Brooks, Springer-Verlag New York, 1997". * '* * '* Basic Release By J-P Moreau, Paris. * '* (www.jpmoreau.fr) * '******************************************************** ' Explanations: ' ------------ ' ' An electron accelerated by a voltage V in an electron gun ' ' 2 2 ' acquires an energy of Ve = mc - m c, where ' 0 ' -19 ' charge on an electron e = 1.602 x 10 coulomb ' ' -31 ' rest mass m = 9.109 x 10 kg ' 0 ' 8 ' speed of light c = 2.9979 x 10 m/s ' ' The speed v of an electron of relativistic mass m (kg) is ' obtained from ' 2 ' m/m = 1 / sqrt(1 - (v/c) ) ' 0 ' '---------------------------------------------------------- ' restmass, relamass, ( kg ) ' voltage, ( volt ) ' speed, ( m/s ) ' e, ( electron charge in coulomb ) ' c: double; ( speed of light in m/s ) e = 1.602E-19: c = 2.9979E+08: restmass = 9.109E-31 CLS PRINT INPUT " Give electron gun voltage in volts: ", voltage relamass = (voltage * e + restmass * c * c) / (c * c) speed = c * SQR(1! - (restmass / relamass) ^ 2) PRINT PRINT " Relativistic mass (kg) and speed (m/s):" PRINT " "; relamass; " "; speed PRINT END ' End of file rel_mass.bas