/***************************************************************************** File Name : "Star Destr.c" Contents : star "destruction" by tidal field of "live" BH (1 or 2) Coded by : Peter Berczik Last redaction : 2010.IX.14 1:43PM *****************************************************************************/ void star_destr(double time, int n, int ind[], double m[], double x[][3], double v[][3], double pot[], double a[][3], double adot[][3], double t[], double dt[], int N, double m_N[], double x_N[][3], double v_N[][3], double a_N[][3], double adot_N[][3], double t_N[], double *m_bh, int *num_bh, int i_bh) { int n_end, k_act, N_end; double R_t, e_kin=0.0, e_pot_BH=0.0, e_pot=0.0, e_corr=0.0; double eps_bh, eps2, eps_bh2, rsb, rkb2, rks2, xp[3], v_bh[3]; //double vir = 0.6, gamma = 1000.0; double x_max = 1.0E+03, v_max = 1.0E-08, a_max = 1.0E-08, adot_max = 1.0E-08; if( time < t_diss_on ) return; eps_bh = eps; eps2 = SQR(eps); eps_bh2 = SQR(eps_bh); /* m_s = 1.0/N; R_s = 2.52E-08/2.507328103; R_t = gamma * R_s * pow( 2.0*(*m_bh/m_s), over3 ); */ R_t = R_TIDAL; /* if(myRank == rootRank) { printf("%.6E \t %06d %06d %06d \t %.6E \t %.6E %06d \n", time, n, i_bh, ind[i_bh], R_t, *m_bh, *num_bh); fflush(stdout); } */ #ifdef ADD_BH2 n_end = n-2; N_end = N-2; #else #ifdef ADD_BH1 n_end = n-1; N_end = N-1; #endif // ADD_BH1 #endif // ADD_BH2 /* if(myRank == rootRank) { printf("%.6E \t %06d %06d %06d %06d \t %.6E \t %.6E %06d \n", time, n, n_end, i_bh, ind[i_bh], R_t, *m_bh, *num_bh); fflush(stdout); } */ for(i=0; i