00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 char star_bhns_kinema_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_kinema.C,v 1.2 2008/05/15 19:16:06 k_taniguchi Exp $" ;
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #include <math.h>
00049
00050
00051 #include "star_bhns.h"
00052 #include "unites.h"
00053
00054 void Star_bhns::kinema_bhns(bool kerrschild, const double& mass_bh,
00055 const double& sepa, double omega,
00056 double x_rot, double y_rot) {
00057
00058
00059
00060 using namespace Unites ;
00061
00062 int nz = mp.get_mg()->get_nzone() ;
00063 int nzm1 = nz - 1 ;
00064
00065
00066
00067
00068
00069
00070
00071 const Coord& xa = mp.xa ;
00072 const Coord& ya = mp.ya ;
00073
00074
00075
00076 if (fabs(mp.get_rot_phi()) < 1.e-10) {
00077
00078 bsn.set(1) = - omega * (ya - y_rot) ;
00079 bsn.set(2) = omega * (xa - x_rot) ;
00080 bsn.set(3) = 0. ;
00081
00082 }
00083 else {
00084
00085 bsn.set(1) = omega * (ya - y_rot) ;
00086 bsn.set(2) = - omega * (xa - x_rot) ;
00087 bsn.set(3) = 0. ;
00088
00089 }
00090
00091 bsn.std_spectral_base() ;
00092 bsn.annule_domain(nzm1) ;
00093
00094
00095
00096 for (int i=1; i<=3; i++) {
00097 bsn.set(i) = confo_tot * ( bsn(i) + shift_tot(i) ) / lapconf_tot ;
00098 }
00099 bsn.std_spectral_base() ;
00100 bsn.annule_domain(nzm1) ;
00101
00102
00103
00104
00105
00106
00107
00108 Scalar bsn2(mp) ;
00109 bsn2 = bsn(1)%bsn(1) + bsn(2)%bsn(2) + bsn(3)%bsn(3) ;
00110 bsn2.std_spectral_base() ;
00111
00112 if (kerrschild) {
00113
00114 double mass = ggrav * mass_bh ;
00115
00116 Scalar xx(mp) ;
00117 xx = mp.x ;
00118 xx.std_spectral_base() ;
00119 Scalar yy(mp) ;
00120 yy = mp.y ;
00121 yy.std_spectral_base() ;
00122 Scalar zz(mp) ;
00123 zz = mp.z ;
00124 zz.std_spectral_base() ;
00125
00126 double yns = mp.get_ori_y() ;
00127
00128 Scalar rbh(mp) ;
00129 rbh = sqrt( (xx+sepa)*(xx+sepa) + (yy+yns)*(yy+yns) + zz*zz ) ;
00130 rbh.std_spectral_base() ;
00131
00132 Vector ll(mp, CON, mp.get_bvect_cart()) ;
00133 ll.set_etat_qcq() ;
00134 ll.set(1) = (xx+sepa) / rbh ;
00135 ll.set(2) = (yy+yns) / rbh ;
00136 ll.set(3) = zz / rbh ;
00137 ll.std_spectral_base() ;
00138
00139 Scalar msr(mp) ;
00140 msr = mass / rbh ;
00141 msr.std_spectral_base() ;
00142
00143 Scalar llbsn(mp) ;
00144 llbsn = ll(1)%bsn(1) + ll(2)%bsn(2) + ll(3)%bsn(3) ;
00145 llbsn.std_spectral_base() ;
00146
00147 Scalar tmp1(mp) ;
00148 tmp1 = 2. * msr % llbsn % llbsn ;
00149 tmp1.std_spectral_base() ;
00150
00151 gam0 = 1. / sqrt(1. - psi4*(bsn2+tmp1)) ;
00152 gam0.std_spectral_base() ;
00153
00154 }
00155 else {
00156
00157 gam0 = 1. / sqrt(1. - psi4%bsn2) ;
00158 gam0.std_spectral_base() ;
00159
00160 }
00161
00162
00163
00164
00165
00166 pot_centri = - log( gam0 ) ;
00167 pot_centri.annule_domain(nzm1) ;
00168 pot_centri.std_spectral_base() ;
00169
00170
00171
00172
00173 del_deriv() ;
00174
00175 }