summaryrefslogtreecommitdiff
path: root/2084/CH11/EX11.4w/11_4w.sce
blob: 8c658174bcf1cd55a5087ad9defad5bd43495aff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//developed in windows XP operating system 32bit
//platform Scilab 5.4.1
clc;clear;
//example 11.4w
//calculation of the separation between the particles under mutual attraction

//given data
mA=1//mass(in kg) of particle A
mB=2//mass(in kg) of particle B
R=1//initial distance(in m) between the two particles
vB=3.6*10^-2/(60*60)//speed(in m/s) of the particle B
G=6.67*10^-11//universal constant of gravitation(in N-m^2/kg^2)

//calculation
v=(mB*vB)/mA//principle of conservation of linear momentum
U1=-G*mA*mB/R//initial potential energy of the pair
d=U1/(U1-(mB*vB*vB/2)-(mA*v*v/2))//principle of conservation of energy

printf('the speed of particle A is %3.1e m/s',v)
printf('\nthe separation between the particles under mutual attraction is %3.2f m',d)