#!/bin/bash

W="/afs/labts.troja.mff.cuni.cz/homes/bystp5am/"
mkdir -p ${W}SP
cd ${W}SP

E=1E40|bc -l
R=5E10|bc -l
dlr=1E7|bc -l
ro=1E-10|bc -l
G=6.6732E-11|bc -l
cs=200|bc -l

for i in `seq 1 1000`; do
ddr=[ro*cs*cs+E/[2*pi*r*r*r]+[0.5*ro-1]*dr*dr+2*G*ro*ro*r*r/9]/[ro*r/3]*dlr|bc -l
dr=[[[4*pi*r*r*[ro*cs*cs+0.5*E/[pi*r*r*r]+2*G*pi*ro*ro*r*r/9]/[1-2*pi*r*r*ro]]-4*pi*ro*r*r*r*ddr/3]**0.5]*dlr|bc -l
r=r+dr|bc -l
echo 	"${r}	${dr}	${ddr}" >> Spitzer.txt
done
