in the last years a considerable interest in density - embedding methods has led to a widespread development of subsystem approaches @xcite within density functional theory ( dft ) @xcite . in particular , the frozen density embedding ( fde ) method
@xcite has emerged as a popular tool to treat intermolecular interactions in a simple and potentially exact embedding scheme .    in the fde approach
the total electronic density of a system is partitioned into a set of subsystem densities ( e.g. , for two subsystems @xmath0 and @xmath1 : @xmath2 ) .
the total electronic energy is then written as @xmath3 = e[\rho_{\text{a}}+\rho_{\text{b } } ] = t_{\text{s}}[\rho_{\text{a } } ] + t_{\text{s}}[\rho_{\text{b } } ] +   t_{\text{s}}^{{\text{nadd}}}[\rho_{\text{a}},\rho_{\text{b } } ] + \\ \nonumber & & + \frac{1}{2}\int\int\frac{\left(\rho_{\text{a}}({\mathbf{r}}_1)+\rho_{\text{b}}({\mathbf{r}}_1)\right )   \left(\rho_{\text{a}}({\mathbf{r}}_2)+\rho_{\text{b}}({\mathbf{r}}_2)\right)}{{\left|{\mathbf{r}}_1-{\mathbf{r}}_2\right|}}\,d{\mathbf{r}}_1d{\mathbf{r}}_2 + \\ \nonumber & & + \int \left(v_{\text{ext}}^{\text{a}}({\mathbf{r}}_1)+v_{\text{ext}}^{\text{b}}({\mathbf{r}}_1)\right ) \left(\rho_{\text{a}}({\mathbf{r}}_1)+\rho_{\text{b}}({\mathbf{r}}_1)\right)d{\mathbf{r}}_1 + \\ \label{e1 } & & + e_{\text{xc}}[\rho_{\text{a } } ] + e_{\text{xc}}[\rho_{\text{b } } ] + e_{\text{xc}}^{\text{nadd}}[\rho_{\text{a}},\rho_{\text{b}}]\ , \end{aligned}\ ] ] where @xmath4 is the noninteracting kinetic energy functional , the external potential was partitioned as @xmath5 , and the superscript @xmath6 denotes the nonadditive energy contributions to the kinetic and exchange - correlation ( xc ) energies .
the minimization of the energy of eq .
( [ e1 ] ) with respect to one of the subsystem electron densities ( e.g. , @xmath7 ) , keeping the other one fixed and using the expansion of the electron density in terms of ( auxiliary ) kohn - sham orbitals @xmath8 , leads to the kohn - sham equations with constrained electron density ( ksced ) @xcite @xmath9({\mathbf{r } } ) +   v_{\text{emb}}[\rho_{\text{a}};\rho_{\text{b}}]({\mathbf{r}})\right)\psi^{\text{a}}_i = \varepsilon_i^{\text{a}}\psi_i^{\text{a}}\ ] ] with @xmath10({\mathbf{r } } ) & = & \int\frac{\rho_{\text{a}}({\mathbf{r}}_1)}{{\left|{\mathbf{r}}-{\mathbf{r}}_1\right|}}\,d{\mathbf{r}}_1 +   v_{\text{ext}}^{\text{a}}({\mathbf{r } } ) + \frac{\delta e_{\text{xc}}[\rho_{\text{a}}]}{\delta\rho_{\text{a}}({\mathbf{r } } ) } \\ \label{e3_vks } & & \\ \nonumber v_{\text{emb}}[\rho_{\text{a}};\rho_{\text{b}}]({\mathbf{r } } ) & = & v_{\text{ext}}^{\text{b}}({\mathbf{r } } ) +   \int\frac{\rho_{\text{b}}({\mathbf{r}}_1)}{{\left|{\mathbf{r}}-{\mathbf{r}}_1\right|}}\,d{\mathbf{r}}_1 + \\ \label{e3 } & + & \frac{\delta t_{\text{s}}^{{\text{nadd}}}[\rho_{\text{a}},\rho_{\text{b } } ] } { \delta\rho_{\text{a}}({\mathbf{r } } ) } + \frac{\delta e_{\text{xc}}^{{\text{nadd}}}[\rho_{\text{a}},\rho_{\text{b } } ] } { \delta\rho_{\text{a}}({\mathbf{r } } ) } \ . \end{aligned}\ ] ] the ksced of eq .
( [ e2 ] ) provide the solution for the ground state of subsystem @xmath0 subject to the interaction with the frozen density of the subsystem @xmath1 . if the ksced of both subsystems are considered in a freeze - and - thaw procedure @xcite , the full variational solution for the total system , equivalent to the usual kohn - sham solution , is obtained , except for approximations eventually included in the nonadditive interaction terms .
henceforth , the acronym fde wil be used to refer to this approach .
so far , numerous applications of the fde - based method , using the ksced approach , have been presented in literature to study the interaction of non - covalently bound ( or weakly interacting ) molecular complexes or solvated molecules @xcite . in this cases in fact
the nonadditive kinetic energy term can be efficiently approximated by means of semilocal approximations @xcite .
however , because in the conventional formulation the use of ksced is limited to local / semilocal xc functionals , most studies have focused on hydrogen - bond and dipole - dipole systems , since these interactions are dominated by electrostatic and polarization effects that can be described relatively well at the semilocal level of theory @xcite .
recently the method has been also extended to the generalized kohn - sham ( gks ) framework @xcite , so that hybrid functionals can be considered as well . in this approach , named gks - fde , the nonadditive kinetic and xc terms in eq .
( [ e3 ] ) are replaced by the nonadditive direct and residual interactions @xmath11 and @xmath12 which include respectively the orbital - dependent and the explicitly density - dependent kinetic and xc terms .
the presence of nonlocal and/or orbital - dependent terms makes however the direct implementation of the method rather involved .
therefore , a practical computational scheme was proposed where these terms are approximated with local functionals @xcite .
thus , in practice in the gks - fde method the electronic structure is evaluated using a nonlocal exchange operator for the intra - subsystem xc effects but with an embedding potential evaluated at the local / semilocal level of theory .
a similar approximation was also proposed for the extention of the ksced to the use of orbital - dependent optimized effective potentials @xcite .
the gks - fde method was tested for a variety of hydrogen bond and dipole - dipole interactions and proved to be a very good approach for embedded simulations with hybrid functionals @xcite .
in particular , with respect to fde - based calculations employing semilocal xc functionals , it enables a general reduction of the embedding errors , because of the smaller overlap of subsystem densities at the hybrid level , and it allows a better description of subsystem properties due to the removal of most of the self - interaction error ( sie ) @xcite .
furthermore , it makes it possible to extend the application of fde - based techniques to treat systems that are typically poorly described by semilocal xc functionals .
an example of the latter is given by ground - state charge - transfer complexes ( also called donor - acceptor complexes ) .
these systems derive in fact a considerable portion of their stabilization energy from an electron charge - transfer between two centers .
thus , unlike for hydrogen bonds or dipole - dipole interactions , where electrostatic and polarization effects dominate , the interaction in charge - transfer complexes is largely determined by orbital interactions . as a consequence ,
the description of ground - state charge - transfer complexes is very challenging for conventional semilocal xc functionals because of the sie inherent in these methods . on the other hand , a good performance
is generally obtained for hybrid functionals , especially when rather large portions of hartree - fock exchange are included @xcite .
similar results also concern the charge transfer between organic molecules and metal substrates @xcite .    due to the difficult application of dft - based methods using semilocal xc functionals to these systems , in the last years
only few fde investigations treated ground - state charge - transfer complexes and related problems @xcite .
some of them @xcite made use of complicated or _ ad hoc _
reparametrized kinetic energy functionals in order to obtain improved kinetic embedding potentials and improve the description of the system .
however , these kinetic functionals can not be routinely applied in fde calculations for large systems . on the other hand ,
an extensive investigation of different kinetic energy functionals @xcite showed that most popular kinetic energy approximations perform similarly and reasonably well for complexes displaying small / moderate charge transfer , so that it appears reasonable to consider in such applications the same kinetic energy approximation as those commonly used for hydrogen bond and dipole - dipole interactions .
the role of the xc functionals in embedding calculations dealing with charge - transfer systems , instead , was not given much attention so far @xcite .    in this paper
we cover this issue and demonstrate how hybrid functionals can be practically utilized within an embedding scheme to obtain an improvement of the performance in the description of embedded systems for a benchmark of charge - transfer complexes .
the ksced @xcite and gks - fde @xcite approaches are implemented in the turbomole program package @xcite , version 6.4 .
all calculations were performed using the _ fde _ script , which uses a freeze - and - thaw procedure @xcite to guarantee the full relaxation of the embedded ground - state electron density of both subsystems , until dipole moments of the embedded subsystems converged to @xmath13 au . a supermolecular def2-tzvppd @xcite basis set
was employed in all calculations to expand the subsystem electron densities . a monomolecular ( or too small )
basis set is in fact insufficient to carry on fde calculations with good accuracy , resulting in basis - set errors larger than the fde errors and the differences between the methods .
the def2-tzvppd basis set adds diffuse basis functions to the def2-tzvpp @xcite basis set , thus granting an accurate representation for the electron densities even at the relatively large bonding distances characteristic of the systems under consideration .
very accurate integration grids were employed to minimize numerical errors .
additional details about our implementation and computational procedure are reported in refs .  .
in our investigation we considered a set of twelve representative ground - state charge - transfer complexes ( c@xmath14h@xmath15-f@xmath14 , nh@xmath16-f@xmath14 , c@xmath14h@xmath14-clf , hcn - clf , nh@xmath16-cl@xmath14 , h@xmath14o - clf , nh@xmath16-clf , hcn - nf@xmath16 , hnc - nf@xmath16 , hf - nf@xmath16 , clf - nf@xmath16 , and c@xmath14h@xmath15-cl@xmath14 ) . the geometries and the reference binding energies were taken from refs .  , except for the c@xmath14h@xmath15-cl@xmath14 complex ( for this latter case we optimized the geometry at the mp2/aug - cc - pvtz level of theory @xcite and calculated the reference binding energy , in analogy with ref . @xcite as @xmath17 , where @xmath18 is the binding energy computed at the ccsd(t)/aug - cc - pvqz level of theory @xcite and @xmath19 is the difference between the mp2 binding energies computed at the complete basis set limit ( 56-extrapolation @xcite ) and with an aug - cc - pvqz basis set
; the resulting binding energy is in very good agreement to that reported in ref .  ) .
the calculations were performed using conventional semilocal xc functionals ( blyp @xcite , pbe @xcite ) as well as hybrid methods ( pbe0 @xcite and bhlyp @xcite ) .
all calculations were performed using dft - d3 dispersion corrections @xcite . to compute the embedding nonadditive interactions ,
the nonadditive noninteracting kinetic energy term was approximated using the gga functional revapbek @xcite . in the case of hybrid xc functionals
also the nonadditive exchange term was approximated : the pbe and the b88x @xcite exchange functionals were employed for pbe0 and bhylp , respectively ; the resulting methods are indicated as pbe0/pbe and bhlyp / blyp . in the case of semilocal xc functionals instead ,
no approximation for the nonadditive exchange contribution to the embedding potential is required : the same exchange functional is used for the embedding potential , subsystem and conventional supermolecule ks calculations .
the quality of embedded densities was investigated by considering the absolute deviation of plane - averaged embedding density , defined as @xmath20 where @xmath21 is the electron density obtained from a ( generalized ) ks calculation on the whole system . a quantitative measurement of the absolute error associated with a given embedded density
was then obtained by computing the embedding density error @xmath22 with @xmath23 being the number of electrons . in the evaluation of @xmath24
only valence densities were considered to avoid numerical problems related to the high value assumed by the electron density in the core regions and in consideration of the fact that the core density is not important for the determination of chemical and physical properties of interaction between the subsystems , which are of interest here .
the net charge on the @xmath25-th subsystem ( monomer charge ) was calculated for each method by considering a grid - based atoms - in - the - molecule partitioning @xcite of the electron density into atomic basins @xmath26 as @xmath27 with @xmath28 the nuclear charge of the @xmath29-th atom and @xmath30 the number of atoms in the @xmath25-th subsystem . for two interacting subsystems @xmath31
and thus we define the charge transfer as @xmath32 .
reference values for the charge transfer were evaluated using relaxed mp2 densities computed with an aug - cc - pvtz basis set .    finally , to inspect the quality of the embedding energies we considered the error defined as @xmath33 = e^{\text{emb}}[\rho_{\text{a}},\rho_{\text{b } } ]   - e^{\gks}[\rho^{\gks}]\ , \ ] ] where @xmath34 is the embedding energy , computed using the embedding densities into eq .
( [ e1 ] ) , and @xmath35 is the energy resulting from a conventional ( generalized ) ks calculation on the full system .
further analysis was also performed considering , according to ref .  , the error decomposition @xmath36 & = & \delta t[\rho_a,\rho_b,\rho^\gks]+   \delta d[\rho,\rho^\gks ] + \\ \label{eq : enerror } & & + \delta x^s[\rho_a,\rho_b,\rho^\gks]\ , \end{aligned}\ ] ] where the error on embedding energy is partitioned into kinetic ( @xmath37 ) , exchange ( @xmath38 ) , and relaxation ( @xmath39 ) contributions . for full details
see ref .  .
in this section we report and analyze the results of the fde - based calculations on the charge - transfer complexes .
we evaluate the performance of hybrid and semilocal xc functionals ( bhlyp , pbe0 , blyp , and pbe ) , elucidating what are the roles of the exact exchange , of the geometry and of the charge transfer between the subsystems .      in tab . [
tab : enerr ] we report the binding energies obtained from different embedding methods ( @xmath40 ) and the corresponding results from conventional dft calculations on the whole supermolecular system ( @xmath41 ) . in addition , we report the deviation of these results from accurate reference values ( @xmath42 and @xmath43 , respectively ) and the error on embedding energies as defined in eq .
( [ eq_emberr ] ) .
we note that the embedding error on the total energy is exactly equivalent to the difference of the binding energies computed respectively from embedding and conventional supermolecular calculations ( i.e. the dft calculation on the whole system ) , since the contributions from isolated subsystems exactly cancel out . moreover , all binding energies reported in tab . [ tab : enerr ] are dispersion - corrected and , because we use a supermolecular basis set , the basis set superposition error for the total - system calculation is treated in the same way in both dft and fde - based methods ( boys - bernardi correction @xcite ) . in tab .
[ tab : enerr ] we also report in the last lines the mean signed error ( mse ) , the mean absolute error ( mae ) , and the mean absolute relative error ( mare ) with respect to the reference binding energies .    [ cols="<,>,^,>,>,>,>,>,^,>,>,>,>,>",options="header " , ]     @xmath44 ccsd(t)-f12b / vtz - f12 , ref .  .
+ @xmath45 w1 benchmark calculations , ref .  .
+ @xmath46 ccsd(t ) extrapolated to cbs limit , this work .
a first inspection of the results , focusing the attention on @xmath41 and @xmath43 , confirms the finding , well established in literature @xcite , that hybrid functionals outperform semilocal ones for the calculation of interaction energies of ground - state charge - transfer complexes .
in fact , bhlyp with a mare of 16.63% is the most accurate method .
however , when interaction energies from embedding calculations are considered ( i.e. @xmath40 ) , all methods yield rather similar performances with mares in the range 30 - 37% ( for a discussion of the issues related to the comparison of embedding binding energies with experimental or theoretical references see e.g. refs .
this suggests that a strong error cancellation occurs for embedding calculations using semilocal functionals , while the cancellation is much less in the case of hybrid approaches .
the reason for this behavior can be traced back to the fact that , in general , conventional semilocal functionals overestimate significantly the binding energy of charge - transfer complexes @xcite ( mse is largely positive ) while , on the other hand , when used in methods based on the fde theory they show usually a tendency to produce too low interaction energies ( @xmath47 is negative in most cases ) . on the contrary ,
hybrid functionals are quite accurate for the calculation of the interaction energies of charge - transfer complexes and , at the same time , corresponding embedding calculations reproduce with good accuracy the parent supermolecular gks calculations .    concerning the error on embedding energies ( @xmath47 ) , we note that the methods using hybrid xc functionals definitely outperform the ones employing semilocal xc approximations , yielding average deviations more than twice smaller .
this improvement can be partially reconduced , in analogy to what shown in refs .
, to a smaller overlap of the subsystem densities ( i.e. to a smaller sie ) at the hybrid level , that leads to a reduction of the error on embedding energy .
this effect is best recognized if we consider a set of systems where only one subsystem is varying , as for nh@xmath16 interacting with cl@xmath14 , clf , and f@xmath14 respectively . in this case
the value of @xmath47 is increasing from 2.6 to about 7 mha when the cl atoms are replaced by f atoms and this increase nicely correlates to the fact that the fluorine atom is affected by a larger self - interaction error than chlorine , so that it is plagued by a stronger overestimation of the diffuseness of the electron density at semilocal level of theory .
however , in general it is not possible to find a trend valid for all the systems due to the different details of the interaction when both subsystems are changed .
in fact , despite the inclusion of exact exchange in the calculations may help to reduce the errors on embedding energies by lowering the effective overlap between the two subsystems , this is not the only effect determining the accuracy of the gks - fde energy calculations . in particular for hybrid methods still a subtle error compensation between kinetic , relaxation , and exchange contributions occurs .
thus , to shed light on the different aspects determining the embedding energy error we can recur to the embedding energy decomposition introduced in ref .  .
[ tab : errdecom ] we report the energy error contributions @xmath48 and @xmath38 for all the hybrid methods ( bhlyp and pbe0 ) and system considered . for each energy error contribution
we report the mse , mae and mare .
the contributions due to kinetic ( @xmath37 ) and relaxation ( @xmath39 ) effects are reported summed together because both terms yield very large values ( 100 - 200% of the binding energies ) and with opposite sign , so they only contribute to the total error through a strong error cancellation .
lcc systems & bhlyp & pbe0 + & + nf@xmath16-hcn & -0.4 & -0.4 + c@xmath14h@xmath15-f@xmath14 & 2.6 & 3.4 + nf@xmath16-hnc & -0.3 & -0.2 + c@xmath14h@xmath15-cl@xmath14 & 0.3 & 1.1 + nh@xmath16-f@xmath14 & 3.7 & 5.5 + nf@xmath16-clf & 1.1 & 1.8 + nf@xmath16-hf & 0.6 & 0.8 + c@xmath14h@xmath14-clf & 2.2 & 3.3 + hcn - clf & 0.4 & 1.2 + nh@xmath16-cl@xmath14 & 0.9 & 2.3 + h@xmath14o - clf & 0.8 & 1.9 + nh@xmath16-clf & 2.9 & 4.3 + mae & 1.35 & 2.19 + mse & 1.23 & 2.09 + mare & 39.19% & 58.65% + sdre & -33.51% & -12.97% + & + nf@xmath16-hcn & 1.0 & -0.0 + c@xmath14h@xmath15-f@xmath14 & -0.4 & -1.5 + nf@xmath16-hnc & 0.5 & -0.3 + c@xmath14h@xmath15-cl@xmath14 & -0.4 & -1.6 + nh@xmath16-f@xmath14 & -1.2 & -2.5 + nf@xmath16-clf & 0.4 & -0.9 + nf@xmath16-hf & 0.2 & -0.6 + c@xmath14h@xmath14-clf & -0.5 & -1.7 + hcn - clf & 0.3 & -1.2 + nh@xmath16-cl@xmath14 & -1.0 & -2.1 + h@xmath14o - clf & 0.0 & -1.5 + nh@xmath16-clf & -2.7 & -3.0 + mae & 0.72 & 1.41 + mse & -0.32 & -1.41 + mare & 19.10% & 34.10% + xde & -0.41 & -1.28 + xdre & -6.79% & -28.83% +    the analysis of the @xmath48 contributions shows that the use of the subsystem electron densities from hybrid calculations can provide a significant improvement of the semilocal embedding energies ( the maes are 1.35 and 2.19 to be compared with 2.54 and 2.61 ) , although the errors are still larger than the global ones reported in tab . [
tab : enerr ] ( maes of 0.94 and 0.90 for bhlyp and pbe0 , respectively ) .
this improvement is determined exclusively from the reduced overlap displayed by the densities obtained from hybrid calculations , since here no exchange approximation is considered . to make a quantitative evaluation of the effect it is possible to use the semilocal differential relative error ( sdre ) statistical indicator , defined as @xmath49 with the sum
extend over all the @xmath23 systems reported in the table .
a negative value of sdre indicates that using subsystem densities from a given hybrid calculation improves on average the calculation of kinetic and relaxation energy contributions over the use of gga densities . using the sdre indicator it is thus possible to compare energetic error terms with the same explicit level of approximation , i.e. the semilocal kinetic energy approximation and the density relaxation error @xcite .
looking at the values of sdre for the two hybrids considered in the table , it can be seen that in both cases these methods outperform the corresponding semilocal ones ( negative values of sdre ) .
this result reflects the good quality of the electron densities computed with hybrid embedding methods ( see next section ) and evidences once more the importance of the density overlap in this context .
in fact , the larger improvement is obtained for bhlyp ( sdre of -33.51% ) due to its higher content of exact exchange with respect to pbe0 ( sdre of -12.97% ) .
considering the exchange contributions to the embedding error ( @xmath38 ) we note immediately that , for both methods , they are in general of opposite sign and of the same order of magnitude as the @xmath48 terms .
hence , an important error cancellation effect occurs in all cases .
this effect can be measured by considering the exchange differential error ( xde ) and the exchange differential relative error ( xdre ) statistical indicators @xcite @xmath50 which provide ( by increasingly negative values ) an estimation of the improvement due to the error cancellation effect induced by the additional approximation on the exchange nonadditive embedding terms . for bhlyp and pbe0
the xde and xdre values are negative , indicating , as expected , an error cancellation between the kinetic - relaxation and the exchange contributions
. however , the xde is three times larger for pbe0 than for bhlyp , so in the former case a much more effective error cancellation occurs .
this explains why pbe0 has the smaller energy error @xmath47 in tab .
[ tab : enerr ] , despite it has kinetic - relaxation errors significantly larger than bhlyp .      in this section
we consider the ability of different embedding methods to reproduce the electron density of supermolecular charge - transfer systems .
this is an important test for embedding approaches and provides direct insight into the quality of the embedding potential @xcite . to discuss this issue
we report in fig .
[ denserr ] the plot of the absolute deviation of the plane - averaged densities ( @xmath51 ; see eq .
( [ drho ] ) ) for the c@xmath14h@xmath15-f@xmath14 complex , as an example .
for other systems similar plots are obtained ( not reported ) .
absolute deviation from the reference supermolecular electron density of plane - averaged embedding densities obtained from different embedding approaches , for the c@xmath14h@xmath15-f@xmath14 complex .
the filled circles on the @xmath52-axis denote the atoms positions . ]
the figure shows that , unlike for hydrogen bond systems @xcite , which are prototypical examples for fde - based studies , the density errors are quite different for different methods , especially if hybrid and gga approaches are compared .
this trend can be well captured by considering the integrated errors on embedding densities ( @xmath24 ; see eq .
( [ eq : xi ] ) ) , as resulting from different methods , which are reported in tab .
[ tab : dens_err ] .
lcccc & & + systems & bhlyp & pbe0 & blyp & pbe + nf@xmath16-hcn & 0.13 & 0.24 & 0.29 & 0.29 + c@xmath14h@xmath15-f@xmath14 & 1.58 & 2.75 & 6.94 & 6.35 + nf@xmath16-hnc & 0.41 & 0.49 & 0.58 & 0.58 + c@xmath14h@xmath15-cl@xmath14 & 3.34 & 4.31 & 5.83 & 5.77 + nh@xmath16-f@xmath14 & 2.24 & 4.36 & 9.84 & 9.59 + nf@xmath16-clf & 0.64 & 0.99 & 1.64 & 1.73 + nf@xmath16-hf & 0.60 & 0.74 & 0.96 & 0.94 + c@xmath14h@xmath14-clf & 3.14 & 4.32 & 6.03 & 6.02 + hcn - clf & 1.76 & 2.33 & 3.13 & 3.21 + nh@xmath16-cl@xmath14 & 3.98 & 5.48 & 7.45 & 7.60 + h@xmath14o - clf & 2.37 & 3.41 & 4.89 & 5.06 + nh@xmath16-clf & 8.07 & 9.37 & 11.27 & 11.15 +   + mae & 2.35 & 3.23 & 4.90 & 4.86 +    these data , along with the proportionality of the @xmath53 profiles reported in fig .
[ denserr ] ( the embedding errors in the density have a similar spatial distribution ) , show that for all systems the errors on embedded densities are directly correlated to the amount of exact exchange included in the calculations ( see also next section ) .
in fact , the best results are found for bhlyp , which includes 50% of hartree - fock exchange and has a mae of only 2.35 , comparable to that found in the case of hydrogen - bond and dipole - dipole interactions @xcite . on the contrary ,
methods based on gga xc functionals yield significantly larger errors , more than twice as large as the bhlyp ones .
we note that such large variations of the embedding density error with the method are rather unusual and are not encountered in the case of hydrogen bond and dipole - dipole complexes @xcite .
this indicates the special relevance of the inclusion of exact exchange for the treatment of charge - transfer complexes via fde - based methods and fully agrees with the analysis made in the previous section about the role of relaxation effects for the energy errors of different methods .    beside the total quality of the embedding density , in the present context
another quantity of great interest is the net charge transfer predicted by different methods for the complexes under examination .
the results for the various approaches , together with reference mp2 values are reported in tab . [
tab : ct ] .
lrccrccrc systems & @xmath54 & @xmath55 & @xmath56 & @xmath54 & @xmath57 & @xmath56 & @xmath54 & mp2 + & & & & & & + nf@xmath16-hcn & & 0.017 & 0.011 & & 0.012 & 0.010 & & 0.009 + c@xmath14h@xmath15-f@xmath14 & & 0.082 & 0.014 & & 0.029 & 0.015 & & 0.018 + nf@xmath16-hnc & & 0.007 & 0.007 & & 0.006 & 0.006 & & 0.005 + c@xmath14h@xmath15-cl@xmath14 & & 0.093 & 0.044 & & 0.061 & 0.045 & & 0.053 + nh@xmath16-f@xmath14 & & 0.105 & 0.018 & & 0.032 & 0.015 & & 0.026 + nf@xmath16-clf & & 0.035 & 0.013 & & 0.015 & 0.009 & & 0.013 + nf@xmath16-hf & & 0.025 & 0.013 & & 0.018 & 0.012 & & 0.018 + c@xmath14h@xmath14-clf & & 0.102 & 0.051 & & 0.067 & 0.049 & & 0.052 + hcn - clf & & 0.050 & 0.028 & & 0.033 & 0.025 & & 0.034 + nh@xmath16-cl@xmath14 & & 0.122 & 0.060 & & 0.064 & 0.044 & & 0.061 + h@xmath14o - clf & & 0.072 & 0.034 & & 0.041 & 0.028 & & 0.042 + nh@xmath16-clf & & 0.217 & 0.209 & & 0.163 & 0.126 & & 0.177 + & & & & & & & & + mse & & 0.035 & -0.001 & & 0.003 & -0.011 & & + mae & & 0.035 & 0.007 & & 0.005 & 0.011 & & + mare & & 118.07% & 18.64% & & 17.50% & 25.63% & & + & & & & & & + nf@xmath16-hcn & & 0.016 & 0.011 & & 0.013 & 0.011 & & 0.009 + c@xmath14h@xmath15-f@xmath14 & & 0.074 & 0.013 & & 0.039 & 0.013 & & 0.018 + nf@xmath16-hnc & & 0.007 & 0.007 & & 0.006 & 0.006 & & 0.005 + c@xmath14h@xmath15-cl@xmath14 & & 0.093 & 0.044 & & 0.074 & 0.044 & & 0.053 + nh@xmath16-f@xmath14 & & 0.101 & 0.017 & & 0.052 & 0.015 & & 0.026 + nf@xmath16-clf & & 0.037 & 0.013 & & 0.024 & 0.011 & & 0.013 + nf@xmath16-hf & & 0.025 & 0.013 & & 0.020 & 0.013 & & 0.018 + c@xmath14h@xmath14-clf & & 0.101 & 0.050 & & 0.081 & 0.049 & & 0.052 + hcn - clf & & 0.051 & 0.028 & & 0.040 & 0.027 & & 0.034 + nh@xmath16-cl@xmath14 & & 0.125 & 0.061 & & 0.089 & 0.050 & & 0.061 + h@xmath14o - clf & & 0.074 & 0.035 & & 0.054 & 0.030 & & 0.042 + nh@xmath16-clf & & 0.221 & 0.206 & & 0.191 & 0.162 & & 0.177 + & & & & & & & & + mse & & 0.035 & -0.001 & & 0.015 & -0.006 & & + mae & & 0.035 & 0.006 & & 0.015 & 0.007 & & + mare & & 113.80% & 19.26% & & 48.22% & 21.00% & & +    @xmath44 the statistical indicators are computed using the error @xmath58 with @xmath59ks , gks , emb .
the table shows the well - known tendency of the gga xc functionals to overestimate the charge transfer @xcite , so that blyp and pbe yield for @xmath57 mares well above 100% , while much better results ( mare of 17.5% ) are obtained by including a large fraction of exact exchange , as in bhlyp .
however , a different situation is observed when embedding calculations are considered .
these have , in fact , a marked tendency towards an underestimation of the charge transfer , compared to the corresponding supermolecular calculation on the whole system , probably related to the excessive repulsive character of the approximated embedding potential .
this behavior is also much more pronounced for gga methods than for hybrids . as a consequence , the bhlyp results are slightly worsened compared to the reference mp2 ones when embedding is used , while the semilocal methods display a strong improvement .    in order to shine light on this finding
, we consider that embedding densities computed at the semilocal level of theory , when used to compute the energy , provide higher energies for the complexes with respect to corresponding densities from supermolecular calculations ( semilocal functionals stabilize the energy of charge - transfer complexes by overestimating the charge transfer to compensate for the absence of long - range interactions @xcite ) .
because , on the other hand , the isolated systems are not affected by this problem , this leads in general to a reduction of the computed binding energy ( see tab .
[ tab : enerr ] ) , thus effectively compensating for the tendency of the semilocal xc functionals to over - bind .
this explains the fact that in tab .
[ tab : enerr ] , for semilocal functionals , @xmath42 has a much smaller mae and mare than @xmath43 .
it is worth noting that the same considerations also apply to the hybrid approaches , but in these cases the effect is smaller .
in fact , pbe0 binding energies are slightly improved ( on average ) when computed via an embedding approach , while bhlyp results end up to suffer from a slight underbinding .      in previous sections we evidenced the important role of the exact exchange for the description of embedding energies and densities , by comparing the performance of fde - based methods using semilocal xc functionals with that of gks - fde approaches using hybrid functionals based on exactly the same semilocal approximation . to push this
investigation one step further here we consider more generally the family of one - parameter hybrid functionals        @xmath60    where @xmath61 is the hartree - fock exchange , @xmath62 is a parameter , and @xmath63 is the lee - yang - parr correlation energy functional @xcite .
( [ eq : family ] ) reduces to blyp for @xmath64 , to bhlyp for @xmath65 , and was already used to study the role of exact exchange in embedding calculations of hydrogen - bond and dipole - dipole interacting systems in ref .  .
[ fig : alpha ] reports , as a function of @xmath62 , the errors on the embedding energies for selected systems as well as the individual contributions @xmath66 and @xmath38 . for most of the systems the error @xmath47 is found to decrease with @xmath62 until @xmath67 , and then to slightly increase for larger values of the parameter .
this behavior is a consequence of an error cancellation between the @xmath66 contribution ( middle panel ) , which starts from a rather large positive value and decreases with @xmath62 , and the @xmath38 term ( right panel ) , which shows instead an evident parabolic shape with minima located around @xmath68 and provides mostly negative contributions for @xmath69 .
this behavior is quite different from the one observed for dipole - dipole and hydrogen - bond interactions ( see figure i of ref .  ) , which is generally characterized by positive contributions of @xmath38 , increasing with @xmath62 .
the present finding thus shows that for charge - transfer systems a more delicate balancing must be found between the need to increase the exact - exchange contribution , in order to reduce the density overlap , and the necessity to obtain the correct description of long - range xc interactions in the hybrid functional .
errors on the embedding density for selected systems as computed with the family of functionals of eq .
( [ eq : family ] ) . in all calculations
we used the revapbek functional for the non - additive kinetic energies and a supermolecular def2-tzvppd basis set . ]
the family of one - parameter hybrid functionals can be also be employed to study the effect of the exact exchange on the description of embedded densities .
the result of this study was already partially anticipated in previous sections and it is clearly shown in fig . [ adens ] : by increasing the amount of exact exchange the error on the embedding density is monotonically decreased . as mentioned in previous discussions and in ref .
this behavior is mainly due to the reduction of the overlap of the subsystem densities consequent to the reduction of the sie .
of course , the effect is somehow attenuated for very large values of the parameter @xmath62 because of the increased importance of the semilocal approximation used for the exchange term in the gks - fde scheme in these cases , as shown in right panel of fig .
[ fig : alpha ] .
finally , we can consider the ability of methods including different amounts of exact exchange to correctly reproduce the charge transfer .
we thus report in fig .
[ ct_alpha ] the difference @xmath70 between the charge transfer computed for each value of @xmath62 , with or without the embedding treatment , and the reference values obtained from mp2 relaxed densities .
the plot shows that considering full gks calculations the charge transfer is generally overestimated at the gga level and better agreement with the reference is only found when a significative amount of hartree - fock exchange is considered . on the other hand , for embedding calculations
the gks charge transfer can be only reproduced when exact exchange is included , while calculations using a semilocal xc potential yield a strong underestimation with respect to the corresponding supermolecular calculation .
in fact , the charge transfer computed from embedding methods appears to be almost independent from the percentage of exact exchange included in the xc functional . to understand these results we must consider that within fde - based methods the number of electrons on each subsystem is fixed a priori , so that no real charge transfer between them can occur .
the charge transfer must be instead mimicked by a strong polarization of the two subsystem densities , in such a way that their sum will give the same spatial distribution as the electron density of the full system .
the role of the embedding potential is thus to provide a polarization of the subsystems , while each subsystem must respond properly to this perturbation . in the case of semilocal functionals
they are well known to provide a poor description of polarization @xcite , thus a poor description of charge transfer must be expected . on the contrary ,
hybrid functionals have been shown to give a good response to polarization perturbations within the gks - fde scheme @xcite , thus they can provide a good reproduction of the charge transfer between the subsystems .     difference between the charge transfer computed with functionals defined by eq .
( [ eq : family ] ) and the reference mp2 value . in the left panel
we report the results of gks calculations on whole systems ; in the right panel the corresponding embedding results are shown . in all calculations we used the revapbek functional for the non - additive kinetic energies and a supermolecular def2-tzvppd basis set .
]      in an analysis of the performance of embedding methods for the simulation of ground - state charge - transfer complexes it is obviously interesting to study in details what is the relationship between the outcome of the calculations and the magnitude of the charge transfer .
however , this study can not be performed straightforwardly by a simple comparison of different systems displaying different values of the charge transfer because in this way also many other details of the interaction are changed at the same time . for this reason in this section
we prefer to focus the attention on a single system , namely the linear hcn - clf complex , and force a modulation of the charge transfer through the application of an external constant electric field directed along the axis of the complex .    in fig .
[ field ] we report the error on embedding energy ( @xmath47 ) , the error on embedding density ( @xmath24 ) , and the error on the computed net charge on the dihalogen monomer clf ( @xmath71 ) as a function of the charge transfer induced ( at the gks level ) by the applied external field for the two functionals bhlyp and blyp .
the corresponding electric field is reported in the inset of fig .
[ field ] .
errors on embedding energy ( @xmath47 ) , embedding density ( @xmath24 ) , and the computed signed charge transfer on the dihalogen monomer clf ( @xmath71 ) as a function of the charge transfer induced ( at the gks level ) by the applied external field , for bhlyp and blyp .
the inset reports the external electric field used to generate different charge transfer values . ]
the figure shows that both functionals display the same behavior with the induced charge transfer , with all errors increasing as the charge transfer grows .
in fact , the minima of the embedding errors are approximately located at zero charge transfer . the energy error decomposition ( not reported )
confirms that the increase of the energy error is essentially due to a large increase in the kinetic and relaxation contributions .    moreover , the lowest panel of fig .
[ field ] shows , in agreement with our analysis of previous sections , that the increase of charge transfer is in linear correspondence with an increase of the inaccuracy in its evaluation by embedding methods .
this implies , as also shown by a comparison of the two upper panels of fig .
[ field ] with the lower one , that the embedding errors are correlated ( almost linearly ) with the inaccuracy of embedding approaches to correctly describe the amount of charge transfer .
all previous investigations have been carried out at reference geometries . however , for charge - transfer complexes large differences in the equilibrium geometry can be expected for different methods .
in particular , hybrid xc functionals are able to produce equilibrium structures very close to the reference ones but semilocal xc approximations lead to significantly shorter intermolecular distances @xcite . as shown in ref .   the geometry and the intermolecular distance play an important role in determining the accuracy of embedding calculations .
it is therefore interesting , in the present context , to assess this issue for the limits represented by the structures optimized at the semilocal blyp and hybrid bhlyp level .    to this end
we consider in fig .
[ geom ] the error on embedding energy ( @xmath47 ) , the error on embedding density ( @xmath24 ) , and the error on the computed monomer charge ( @xmath71 ) at different geometries interpolating linearly between the blyp and the bhlyp optimized geometries of the complex c@xmath14h@xmath15f@xmath14 ( similar results are found for other systems ) .
the intermolecular distance between the f@xmath14 monomer and the plane of the ethylene is @xmath72    and @xmath73    for blyp and bhlyp , respectively .
errors on embedding energy ( @xmath47 ) , embedding density ( @xmath24 ) , and the computed net charge on the ethylene monomer ( @xmath71 ) at different geometries interpolating between the blyp and bhlyp equilibrium geometry of the c@xmath14h@xmath15-f@xmath14 complex . in the inset the embedding error decomposition for the bhlyp case is reported . ]
the figure shows the important role of the geometry for all the embedding results .
this finding can be understood considering that at small intermolecular distances , i.e. at the blyp geometry , the overlap between the electron densities of the two subsystems rapidly grows . moreover , because at reduced distances between the subsystems the orbital interactions are enhanced , also the charge transfer is highly increased , together with the error in its evaluation . as a consequence , large errors can be expected for the embedded densities , due to the well - known limitations of nonadditive kinetic potentials for strongly overlapping densities @xcite . similarly , large errors are found for the embedding energies . in this case
an energy decomposition of the bhlyp embedding error ( see inset of fig . [ geom ] ) further confirms that the increase of the error is essentially due to a large increase of the relaxation - kinetic term , while only a minor role is played by the exchange term @xmath38 .
nevertheless , the latter being always opposite in sign to the relaxation - kinetic contribution provides a moderate error cancellation which improves the final performance of the hybrid method .
the results of fig .
[ geom ] indicate in conclusion that , for the simulation of charge - transfer complexes via embedding approaches , the semilocal methods may display serious problems related to the use of relaxed structures ( e.g. in geometry optimizations or molecular dynamics ) , beside the limitations already highlighted in the previous sections .
therefore , the hybrid approaches appear definitely more robust in such applications .      in previous sections we showed that only embedding approaches making use of hybrid xc functionals can reproduce the ground - state charge transfer of the investigated complexes with reasonable accuracy , while a strong underestimation occurs when semilocal approaches are used .
this fact has important consequences on the accuracy of embedding calculations , that nevertheless are partially , or even mostly , mitigated by error compensation effects .
the improper description of the charge transfer can have however more subtle effects , especially on the one - electron spectrum of the subsystems .
this is an important issue , since the molecular orbitals of the embedded subsystems can be used as the basis for an analysis of the properties of the interacting subsystems and/or as input quantities in response calculations @xcite .
density of states ( dos ) for both gks and hybrid bhlyp ( upper panel ) and the semilocal blyp ( bottom panel ) embedding calculations on the charge - transfer complex nh@xmath16-f@xmath14 .
the solid black line indicates gks dos of the whole system ; the red dashed and solid turquoise lines indicate dos from embedding calculations on the monomers nh@xmath16 and f@xmath14 respectively . in the insets
the gks dos ( thick black line ) is compared with the sum of the two subsystems doss ( dashed magenta line ) .
energy values are in ha . ]
the driving force for ground - state charge transfer in molecular complexes is a sizable difference in the chemical potential between the constituting ( isolated ) subsystems , so that , when the subsystems start to interact , a fraction of the electron density must be moved from one fragment to another to equilibrate it .
the final chemical potential of the complex is an average between those of the initial non - interacting subsystems and it is determining the offset for the kohn - sham potential , thus de facto fixing the energy of the molecular orbitals . in an ideal exact fde - based embedding calculation the embedding potential shall be able , by definition , to yield for the embedded subsystems the same chemical potential as for the full complex and , of course , shall induce a polarization able to mimic the exact charge - transfer . as a side consequence , the single - particle spectrum of the subsystems will be also correct ( as compared to the corresponding supermolecular calculation ) .
similar conclusions apply for any approximated embedding calculation having sufficient accuracy .
on the other hand , if the embedding procedure fails to reproduce the correct charge transfer ( i.e. correct with respect to the calculation on the full system ) , the polarization exerted by the embedding potential on the two subsystems will be insufficient , thus the chemical potential of the two fragments will be rather different from the one of the full system ( too large in one subsystem and too low in the other ) .
consequently , the molecular orbitals of the two subsystems will lay at too high ( for one subsystem ) and too low energies ( for the other ) .
the two cases described above fit very well to the embedding calculations based on hybrid and semilocal functionals , respectively .
this is nicely shown in fig .
[ fig : dos ] where , as an example , we report the density of states ( dos ) of the nh@xmath16-f@xmath14 complex compared to that of the two embedded subsystems as resulting from bhlyp and blyp embedding calculations .
the comparison is in this case rather fair , since the two fragments composing the nh@xmath16-f@xmath14 complex interact only weakly so that the molecular orbitals of the full system can be easily attributed to either of the constituent subsystems .
the figure shows very clearly that bhlyp embedding calculations yield subsystems orbitals which match well the ones from the full system ( within 0.01 ev ) . instead ,
the orbitals from the blyp embedding calculations are systematically shifted with respect to the ones of the corresponding supermolecular calculation , with f@xmath14 orbitals shifted at lower energies and nh@xmath16 ones shifted at higher energies , consistently with the underestimation of charge transfer from nh@xmath16 to f@xmath14 .
finally , we recall in favor of hybrid calculations that even supermolecular calculations using semilocal xc functionals provide a poor description of the single - particle spectrum , while better results can be only obtained by reducing the sie @xcite .
we applied methods based on the frozen density embedding theory to study the electronic properties of ground - state charge - transfer complexes and to clarify the ability of such approaches to treat accurately this class of systems and interactions .
this topic is of particular interest due to the growing popularity of embedding approaches in the field of computational chemistry and the importance of charge - transfer complexes in many chemical applications .
however , to date , embedding calculations have been mainly presented for hydrogen - bond and dipole - dipole interactions , while only few applications dealt with systems where charge transfer plays a significant role @xcite .
our work clarifies some of the motivations for this lack of embedding calculations concerning charge - transfer systems , showing that standard embedding approaches , making use of semilocal xc functionals , display several drawbacks in this context .
moreover , despite they can generally yield interaction energies of good quality ( with respect to accurate references ) , this is due to a strong error cancellation effect and does not reflect a property of the corresponding kohn - sham supermolecular calculation . for these reasons and because semilocal xc functionals are known to perform rather poorly for charge - transfer complexes even in conventional kohn - sham supermolecular calculations , the use of such approaches does not appear appropriate .
the introduction of the gks - fde method mitigates different problems in the fde - based calculations and thus provides a valuable tool to handle embedding calculations of charge - transfer systems .
in fact , in the present work we showed the relevance of exact exchange contributions to reduce the embedding errors and improve the overall performance of the calculations , through a reduction of the coulomb self - interaction error and a better description of subsystems electronic properties .    in conclusion , fde - based approaches making use of hybrid
xc functionals appear as reliable and efficient methods to handle electronic structure calculations of systems characterized by charge - transfer interactions .
this suggest the possibility of future studies in this direction making use of these tools to investigate charge - transfer interactions in complex environments .
this work was partially funded by the european research council ( erc ) starting grant fp7 project dedom , grant no .
the authors thank turbomole gmbh for providing the turbomole program package and m. margarito for technical support .


compton scattering in quasi - spherical accretion flows is thought to be responsible for the x - ray spectra of many accreting compact objects .
for example , the hard x - ray spectra of weakly - magnetic accreting neutron stars can be accounted for if a geometrically thick , hot medium surrounds the neutron star and inner accretion disk ( see , e.g. , psaltis , lamb , & miller 1995 ) .
the spectral signature of isolated neutron stars accreting from the interstellar medium , which is required for their positive identification , is determined mainly by the efficiency of compton upscattering of thermal photons emitted from the stellar surfaces ( see , e.g. , zampieri et al .
moreover , compton scattering plays a major role in the formation of the high - energy spectra of advection - dominated accretion flows , which may be the relevant mode of accretion onto galactic and supermassive black holes ( see , e.g. , esin et al .
1997 ) .
compton scattering in static and moving media , even in plane - parallel or spherical symmetry , couples strongly all three independent phase - space coordinates of the photons , namely their energy , direction of propagation , and spatial coordinate .
for this reason , monte carlo methods have been used extensively in calculating comptonization spectra , because of their easy implementation and natural treatment of the diverse length scales in an accretion flow ( see , e.g. , laurent & titarchuk 1999 for a recent study ; methods and results based on monte carlo treatments have been reviewed by pozdnyakov , sobol , & sunyaev 1983 and will not be discussed here ) .
alternatively , compton scattering can be studied by solving the energy - dependent radiative transfer equation or its moments .
implementing such a method is more difficult and often relies on a number of approximations for describing the interaction of radiation with matter ( see , however , poutanen & svensson 1996 and hsu & blaes 1998 for complete solutions in static media ) .
however , at the same time it is substantially faster and offers significant advantages when the radiative transfer problem is coupled to a solution of the fluid dynamics , as well as in treating steep spectra and processes that do not conserve photons .    over the last twenty five years
several authors have derived the photon kinetic or radiative transfer equation and their moments for compton scattering in static and moving media ( see , e.g. , kompaneets 1957 ; babuel - peyrissac & rouvillois 1969 ; pomraning 1973 ; chan & jones 1975 ; payne 1980 ; blandford & payne 1981a ; thorne 1981 ; fukue , kato , & matsumoto 1985 ; madej 1989 , 1991 ; titarchuk 1994 ) .
the moment equations derived by these various sets of authors have been widely used in studies of comptonization by static media ( see , e.g. , katz 1976 ; shapiro , lightman , & eardly 1976 ; sunyaev & titarchuk 1980 ) or by strong shocks and accretion flows onto compact objects ( see , e.g. , blandford & payne 1981b ; payne & blandford 1981 ; lyubarskij & sunyaev 1982 ; colpi 1988 ; riffert 1988 ; mastichiadis & kylafis 1992 ; titarchuk & lyubarskij 1995 ; turolla et al . 1996 ; titarchuk , mastichiadis , & kylafis 1997 ) , either under the diffusion approximation or with closure relations that were specified a priori .
most of the above analyses of compton scattering in moving media were performed in the system frame and to first order in the electron bulk velocity . on the other hand , schmid - burgk ( 1978 ) , zane et al .
( 1996 ) , and titarchuk & zannias ( 1998 ) have solved the general - relativistic radiative transfer equation for compton scattering without the need for specifying a priori closure relations .    in paper i ( psaltis & lamb 1997 ) of this series , the time - dependent photon kinetic and radiative transfer equations were derived , as well as their zeroth and first moments that describe absorption , emission , and spontaneous and induced compton scattering in static and moving media , correcting various errors in the literature .
the system - frame equations that were derived are valid to first order in @xmath2 and @xmath3 , and to _ second _ order in @xmath1 , where @xmath4 and @xmath5 are the electron mass and temperature , @xmath6 is the photon energy , and @xmath1 is the bulk velocity of the electrons in units of the speed of light ; the fluid - frame equations that were derived are valid for arbitrary values of the bulk velocity @xmath1 . using these equations
it was argued in paper i that the effects of comptonization by the bulk electron velocity that are described by the terms that are second - order in @xmath1 are qualitatively different than and can become at least as important as the effects described by the terms that are first - order in @xmath1 , even when @xmath1 is small . as a result , these second - order terms should generally be retained ( see also yin & miller 1995 ) .    in this paper ,
i describe a numerical algorithm for the solution of time - independent radiative transfer problems in systems with spherical symmetry . even though the natural reference frame for solving transport problems is the one comoving with the flow , i work in the system frame , which can be any inertial frame in which the central object is at rest .
this is important for the fast algorithm described below , because the moment equations in the system frame are always parabolic ( as shown in  3 ) in contrast to the fluid - frame equations ( turolla , zampieri , & nobili 1995 ; smit , cernohorsky , & dullemond 1997 ; see also krner & janka 1992 ) .
moreover , in problems of mass accretion onto a compact star , the boundary conditions are often more easily implemented in the system frame .
i also neglect any general relativistic effects , which can be shown to introduce only small quantitative corrections to the emerging spectra ( papathanassiou & psaltis 2000 ) , and truncate the transfer equation keeping only terms up to second order in @xmath1 .
the algorithm used is a generalization of the method of variable eddington factors ( mihalas 1980 ; see also mihalas 1978 , p.  157158 ) .
it is therefore accurate for systems of arbitrary optical depth and does not require a priori specification of closure relations .
it is based on the iterative solution of both the transfer equation and the systems of its first two moments and hence the validity and accuracy of the solution can be verified explicitly at the end of each run .
the method also requires only a small number of iterations in order to converge to the solution and is therefore ideal for future extensions to time - dependent and multi - dimensional transport problems .    in  2
, i summarize the results from paper i and introduce the notation . in
3 , i discuss the mathematical character of the system of equations and in  4 , i present the numerical algorithm . in  5 ,
i describe the results of numerical solutions of the transfer equations for a variety of situation .
finally , in  6 , i briefly summarize the implications of the above for comptonization spectra in static and moving media .
_ units_throughout this paper i set @xmath7 , where @xmath8 is planck s constant , @xmath9 is boltzmann s constant , and @xmath10 is the speed of light .
i also normalize all the spatial coordinates to the inner radius of the flow , the electron temperature @xmath5 and photon energy @xmath6 to the electron rest mass @xmath4 , and the electron density @xmath11 to its value at the inner radius of the flow .
finally , i normalize the emission and absorption coefficients @xmath12 and @xmath13 to the inverse of the electron scattering mean - free path in the thomson limit .
_ the electron gas_let @xmath14 be the system - frame three - velocity of a given electron .
i define the local bulk velocity @xmath15 of the electrons measured in the system frame as @xmath16 where the sharp brackets indicate the average over the local electron velocity distribution .
i also assume that the electron velocity distribution in the fluid frame is a relativistic maxwellian and therefore @xmath17 where i have neglected terms of order @xmath18 and higher .
_ the radiation field_i describe the radiation field at any position in the system frame with coordinate vector @xmath19 using the monochromatic specific intensity @xmath20 , where @xmath21 is the direction of propagation and @xmath6 is the photon energy . here
i consider only unpolarized radiation and hence i have suppressed the dependence of the specific intensity on polarization . because of the assumed spherical symmetry of the problem , the radiation field depends only on the radial distance from the center of symmetry ( i.e. , the @xmath22component of the vector @xmath19 ) , on the angle @xmath23 between the radial direction and the direction of propagation ( i.e. , @xmath24 ) , and on the photon energy @xmath6 .
i define the first five moments of the monochromatic specific intensity as @xmath25 the non - zero components of the first five moments of the specific intensity for systems with spherical symmetry are given in appendix  a.    _ the transfer equation and its moments_following mihalas ( 1980 ; see also mihalas 1978 ) , i solve the radiative transfer equation in a plane that contains the center of symmetry of the system , between the inner and outer radii @xmath26 and @xmath27 of the flow , using the coordinates @xmath28 and @xmath29 .
the radiative transfer equation along a ray of constant impact parameter @xmath30 is @xmath31 where the signs ` @xmath32 ' and @xmath33 correspond to the equations for the outgoing and incoming rays respectively and i have neglected the effects of induced compton scattering . in equation  ( [ rteq ] ) i have used the optical depth along the ray defined as @xmath34 dz$ ] , where @xmath35 at the outer boundary and @xmath36 is the angle - integrated thomson scattering cross section .
@xmath37 is the generalized source function for absorption , emission , and compton scattering in systems with spherical symmetry and is given in appendix  b.    the equations for the moments of the specific intensity can be derived either directly from equation ( [ rteq ] ) or from equations ( 34 ) and ( 40 ) of paper i. written in compact form and using the dimensionless quantities defined above , the moment equations are term reported in paper i ( psaltis & lamb 1997 ) contained a typo that has been corrected here . ] @xmath38 where @xmath39 , @xmath40 , @xmath41 , and @xmath42 .
when the electron density is uniform , then the dimensionless quantity @xmath43 is equal to the electron scattering optical depth in the radial direction measured from @xmath27 .
the coefficients in equations ( [ 0th3 ] ) and ( [ 1st ] ) are given in appendix  c.    _ boundary conditions_the boundary conditions for both the transfer equation and the system of its moments depend on the specific problem under study .
for the model problems discussed in  5 , i shall assume that the flow is not illuminated from the outside , i.e. , @xmath44 at the outer boundary , and specify the radiation flux at the inner boundary as @xmath45    for solving the moments of the radiative transfer equation i shall specify , for all photon energies @xmath6 , the first moment of the monochromatic specific intensity at the inner radius , i.e. , @xmath46 as well as the ratio of the first to the zeroth moment of the monochromatic specific intensity at the outer radius @xmath47 the quantity @xmath48 is not known a priori but is calculated in a self - consistent way in the iterative method described below .
i shall also set at all radii @xmath49 and @xmath50 which reflect the fact that the photon occupation number and the radiation flux are finite quantities .
in the method of variable eddington factors , the system of partial differential equations ( [ 0th3 ] ) and ( [ 1st ] ) is solved iteratively with the radiative transfer equation  ( [ rteq ] ) , given a set of eddington factors computed from the previous iteration .
the boundary conditions and the method used for the solution of the system depends on the character of the partial differential operator . for example , the system of moment equations in the frame _ comoving _ with the flow ( or the local lorentz frame when gravitational effects are taken into account ) may be hyperbolic or elliptic , depending on the velocity field ( turolla et al .
1995 ) . in this section
i follow the procedure outlined by ames ( 1992 , pp .
812 ) to show that the _ system - frame _ , energy dependent moment equations always form a parabolic system of partial differential equations , thus simplifying the implementation of the numerical algorithm .
i define the quantities @xmath51 and @xmath52 , which together with the partial differential equations ( [ 0th3 ] ) and ( [ 1st ] ) , and the equations for the differentials @xmath53 , @xmath54 , @xmath55 , and @xmath56 , form an @xmath57 system of algebraic equations for the eight derivatives @xmath58 \cdot \left [ \begin{array}{c } \partial_\e j\\ \partial_{\tau_r } j\\ \partial_\e h^r\\ \partial_{\tau_r } h^r\\ \partial_\e l\\ \partial_{\tau_r } l\\ \partial_\e m^r\\ \partial_{\tau_r } m^r\\ \end{array } \right ] & = & \qquad\qquad\qquad\qquad\nonumber\end{aligned}\ ] ] @xmath59\;.\ ] ] equating the determinant of the coefficient matrix to zero , i obtain the characteristic equation for the system of equations , @xmath60 the coefficients @xmath61 and @xmath62 are proportional to the electron temperature and the square of the bulk velocity ( see appendix  c ) and hence for the problems under consideration they are never zero .
therefore , for a finite electron energy @xmath6 , the system of partial differential equations ( [ 0th3 ] ) and ( [ 1st ] ) has only one multiple , real characteristic direction , i.e. , @xmath63 , and hence is always parabolic .
the difference with respect to the moment equations in the comoving frame arises from the presence of second order energy derivatives in the differential operator .
equation ( [ rteq ] ) is an integro - differential equation for the specific intensity of the radiation field and therefore any numerical solution of this equation is not trivial to obtain . on the other hand ,
the system of equations ( [ 0th3 ] ) and ( [ 1st ] ) depends on two variable eddington factors and an unknown outer boundary condition , which can be computed only when the solution of equation ( [ rteq ] ) for the specific intensity is obtained . here
, i employ a numerical algorithm that is a generalization of the method of variable eddington factors ( mihalas 1980 ; see also mihalas 1978 , pp .
157158 ) in order to solve iteratively equation ( [ rteq ] ) for the specific intensity of the radiation field and the system of partial differential equations ( [ 0th3 ] ) and ( [ 1st ] ) for its zeroth and first moments .
this algorithm has been proven to be very efficient and gives a solution to the complete transfer equation that is limited only by numerical accuracy , independent of the optical depth of the medium .    in this method ,
i first solve the moments of the transfer equation using an initial guess for the variable eddington factors and for the outer boundary condition .
i then compute the generalized source function using the calculated moments of the specific intensity , solve the radiative transfer equation , and use this solution to update the eddington factors .
i repeat the whole procedure until convergence is achieved .
the moments of the transfer equation depend only on radius and photon energy , when the variable eddington factors are known .
therefore , i discretize the domain of solution and the differential operators of equations ( [ 0th3 ] ) and ( [ 1st ] ) on a two  dimensional mesh of @xmath64 grid points over the variable @xmath43 and @xmath65 grid points over the photon energy @xmath6
.    the mesh of discrete grid points over the variable @xmath43 must resolve the rapid change of the variable eddington factors with optical depth near both boundaries of the domain of solution . in order to achieve this ,
i define the mesh points to be equidistant in the quantity @xmath66 where @xmath67 is the total optical depth ( and not the quantity @xmath43 ) in the radial direction measured from @xmath27 , @xmath68 is the maximum radial optical depth in the medium , and @xmath69 is a parameter that allows a combination of a logarithmic grid near the boundaries with a linear grid in the interior . because the spectra that emerge from comptonizing media are usually power laws , i use a logarithmic mesh of discrete grid points over photon energy @xmath6 .
the system of moment equations involve differentiation over two density - like quantities , the radiation energy density @xmath70 and the first eddington factor @xmath71 , and two flux - like quantities , the radiation energy flux @xmath72 and the second eddington factor @xmath73 .
i discretize density - like quantities in a shell - centered fashion and flux - like quantities on the grid points .
let @xmath74 be the value of a physical quantity at the @xmath75th grid point in the variable @xmath43 and the @xmath76th grid point in photon energy .
away from the boundaries , i differentiate density - like quantities over the variable @xmath43 on the grid points as @xmath77 and flux - like quantities as @xmath78 in an explicit or fully implicit scheme .    in both equations
i approximate the first derivative of a physical quantity @xmath79 with respect to photon energy by @xmath80 and the second derivative with respect to photon energy by @xmath81 where the index ` @xmath75 ' in the quantity @xmath74 may also be fractional , corresponding to a shell center , as needed by an implicit differencing scheme over the variable @xmath43 .
the energy differencing scheme  ( [ 1stder])([2ndder ] ) can not be used directly in differencing the radiation energy density and flux in equations  ( [ 0th3 ] ) and ( [ 1st ] ) because it does not guarantee particle conservation when only scattering is taken into account ( chang & cooper 1970 ) .
this is important when the energy spectrum has reached quasi - equlibrium and small numerical errors lead to significant deviation from particle conservation ( see eq .  [ 10 ] in chang & cooper 1970 ) .
a better differencing scheme can be deduced by examining the properties of the differential operator at that limit .
the solution of the moment equations reaches quasi - equlibrium when the photon mean free path is very small compared to any characteristic length scale in the system . in that limit , @xmath82 , and
when only processes that conserve photon number are operating , the moment equation of zeroth order becomes @xmath83\ ; ,    \label{cons}\ ] ] where @xmath11 is the dimensional electron density .
the photon number flux is simply equal to @xmath84 and integrating equation  ( [ cons ] ) over photon energy gives @xmath85 i.e. , photon conservation .
following chang & cooper ( 1970 ) , i define a generalized photon current @xmath86 as @xmath87 and write the zeroth and first moment equations as @xmath88 where the coefficient are given in appendix  d. differencing equations  ( [ 0th4])([1st4 ] ) according to the scheme  ( [ back])([2ndder ] ) results in strict photon number conservation in the limit of small photon mean free paths .    a final point with the energy differencing
is related to the requirement that the photon energy density is everywhere positive .
this introduces a restriction on the spacing of the energy grid , depending on the differencing scheme . for the scheme used above
it can be shown that the requirement for a positive photon energy density results in the restriction ( cf .
.  [ [ cons ] ] and chang & cooper 1970 , eq .  [ 14 ] ) @xmath89 which can be easily met .
i solve the system of equations  ( [ 0th4 ] ) and ( [ 1st4 ] ) for the zeroth and first moments of the specific intensity of the radiation field , @xmath70 and @xmath72 , in @xmath64 grid points in optical depth and @xmath90 grid points in photon energy .
therefore the system of equations has @xmath91 unknowns . in all the interior grid points ( @xmath92 ;
@xmath93 ) i solve both equations  ( [ 0th4 ] ) and ( [ 1st4 ] ) using the differencing scheme of equations  ( [ back])([2ndder ] ) .
for the inner spatial boundary , i.e. , for @xmath94 and for all @xmath76 , i solve equations  ( [ inboundmom ] ) and ( [ 1st4 ] ) , whereas for the outer spatial boundary , i.e. , for @xmath95 and for all @xmath76 , i solve equations  ( [ outboundmom ] ) and ( [ 0th4 ] ) .
finally , at both energy boundaries , i.e. , for all @xmath75 and for @xmath96 , i set both the zeroth and first moments of the specific intensity equal to zero , according to boundary conditions ( [ ein ] ) and ( [ eout ] ) .
the resulting system of equations is linear in both the zeroth and first moments of the specific intensity . defining the quantity @xmath97 as @xmath98 the system of equations takes the form shown in figure  1 .
the matrix of coefficients is a sparse matrix and can be solved efficiently with the biconjugate gradient method ( see , e.g. , press et al .
1992 , pg .
209 ) with a preconditioner matrix .
i choose the preconditioner matrix to be the coefficient matrix , with the elements at the outer two diagonal bands set equal to zero .
the preconditioner matrix can then be inverted efficiently with the lu - decomposition method ( see , e.g. , press et al .
1992 , pg .
202 ) . in this method , in order to avoid round - off errors , i scale all the rows in the coefficient matrix so that the highest value of the elements in each row is unity . depending on the complexity of the particular problem
, the system of difference equations can be solved to a fractional accuracy of @xmath99 within less than fifty iterations , which can be performed in a few seconds on a current workstation .      in the iterative method of the variable eddington factors ,
the transfer equations  ( [ rteq ] ) is solved at every grid point in the @xmath100 plane for the boundary conditions  ( [ inbound ] ) and ( [ outbound ] ) .
because the generalized source function is calculated using the results from the previous iterations , the solution of equation ( [ rteq ] ) is just the formal solution that can be obtained analytically , i.e. , @xmath101 where @xmath102 and @xmath103 or @xmath104 when @xmath105 or @xmath106 respectively . in calculating the integrals in equation  ( [ formal ] ) , i use a piece - wise linear interpolation of the source function through each shell and evaluate the energy derivatives according to equations  ( [ 1stder])([2ndder ] ) .
the rapid convergence of the method of variable eddington factors is preserved in the current implementation for the problem of compton scattering .
this is shown in figure  2 , where the maximum fractional error in the radiation energy density is plotted for each iteration , for two uniform media with different scattering optical depths .
for the model problems shown , the outer radius of the scattering medium is set to @xmath107 , its electron temperature to 10  kev , and the energy - dependence of the radiation flux at the inner boundary to be that of a blackbody with a temperature of 0.5  kev .
the converge is typically faster for problems with higher optical depths , because i have used @xmath108 as an initial value for the first variable eddington factor , which is closer to the real value at the limit of high optical depth .
the numerical method described in this section also allows for a consistency check between the solution of the transfer equation and the solution of the moment equations that can be performed for each individual problem . for this test ,
equation  ( [ rteq ] ) can be solved iteratively without using the solution of the system of equations  ( [ 0th3])([1st ] ) , by starting with an assumed generalized source function [ e.g. , @xmath109 , solving the transfer equation for the specific intensity , updating the generalized source function , and repeating until convergence is achieved .
the moments of the specific intensity can then be obtained in this way and compared directly with the moments obtained by solving equations  ( [ 0th3 ] ) and ( [ 1st ] ) .
the desired accuracy of the calculations , which is affected mainly by the choice of the discrete mesh , depends on the particular problem . because the main goal of this study is the calculation of the spectra of accreting compact objects ,
the x - ray colors of which are observed to change by a few percent when the mass accretion rate changes by a factor of @xmath110 , i require for the solutions a fractional accuracy of @xmath111 at each grid point .
in this section i solve the radiative transfer equation for a number of model problems with spherical symmetry that are related to various astrophysical systems and in particular to media around compact objects . in
5.1 , i discuss comptonization of soft x - ray photons by a static , uniform medium of hot electrons . in
5.2 , i solve the radiative transfer equation in a cold , divergence - free inflow ; although such a configuration requires fine tuning of the physical conditions around an accreting object and may not occur in nature , it is used here to provide physical understanding of the effect of comptonization by the bulk electron velocity .
finally , in  5.3 , i discuss more realistic problems of spherical accretion onto and outflows from compact stars .
for the first model problem , i consider a static , spherically symmetric , purely scattering medium and set the parameters to values that are typical for weakly magnetic , accreting neutron stars ( see psaltis et al .
i set the outer radius of the scattering medium to @xmath107 , its electron temperature to 10  kev , its electron scattering optical depth to 4 , and the energy - dependence of the radiation flux at the inner boundary to be that of a blackbody with a temperature of 0.5  kev ; the normalization of the input flux is arbitrary because i have assumed that there are no sources of photons in the medium .
this is a frequently solved problem that has been analyzed in detail by , e.g. , katz ( 1976 ) , shapiro et al .
( 1976 ) , and sunyaev & titarchuk ( 1980 ) .
all these authors showed that the emerging radiation spectrum at energies much larger than the energy of the injected photons is largely independent of the details of the input spectrum and can be described by a power - law with an exponential cut - off at @xmath112 . here
i solve this simple problem to study the fact that the variable eddington factors are not independent of energy even when the photon mean - free path is independent of energy and the medium is static ( see also the discussion in paper  i ) .
figure  3 shows the zeroth and first moments of the specific intensity of the radiation field , @xmath70 and @xmath72 , as a function of photon energy and radius .
both quantities decrease overall with increasing radius because of the dilution of the radiation field .
the energy dependence of the radiation energy density changes within one photon mean - free - path from the inner boundary but remains unchanged at larger radii . on the other hand
, the radiation flux evolves throughout the scattering medium .
this is a consequence of the fact that the system of moment equations has been solved by imposing an inner boundary condition on @xmath113 and an outer boundary condition on the ratio @xmath114 and not on @xmath70 itself .
figure  4 shows the first eddington factor @xmath115 at two photon energies as well as the ratio of the energy - integrated second to zeroth moments of the specific intensity of the radiation field .
the eddington factor depends on photon energy even though the scattering cross section and hence the photon mean - free - path are mostly energy independent at these low photon energies .
this is because photons were injected into the medium with energies @xmath116 and on average gain energy at each scattering . as a result ,
photons emerging with low energy have experienced on average a smaller number of scatterings than photons with higher energy and therefore their distribution is less isotropic .
figure  5 compares the emerging radiation spectrum obtained using the method of variable eddington factors with the spectra obtained using the same boundary conditions but two energy - independent prescriptions of the first eddington factor that are commonly used ; the second eddington factor does not enter the calculation when the bulk velocity of the electrons is zero .
note that neither prescription is the correct diffusion approximation for compton scattering because they both neglect the energy dependence of @xmath71 on photon energy shown in figure  4 .
however , the discrepancy between the self - consistent solution and the ones obtained using prescribed eddington factors is small for the prescription that depends on optical depth and can be as large as @xmath117% at high photon energies for the prescription that is independent of optical depth .
this discrepancy increases when the ratio of the photon mean - free path to the smallest characteristic length scale in the system increases .      in a moving medium ,
the photons gain energy by scattering off the fast moving electrons .
as measured by an observer _ comoving with the medium _ , the photon energy density increases mostly due to the convergence of the flow , which is described by terms that are proportional to @xmath118 ( blandford & payne 1981 ) . on the other hand , the flux that is measured by an observer _ at infinity _ increases because of the systematic energy exchange between photons and electrons , which is described mostly by terms that are second - order in @xmath1 ( psaltis & lamb 1997 ) .    in order to investigate the effects of comptonization by the bulk electron flow and distinguish them from the effects of the convergence of the flow
, i study in this section the photon - electron interaction and the formation of spectra in fast , divergence - free flows . for the model problems shown below
, i set the outer radius of the scattering medium to @xmath119 , the electron temperature to zero , and the electron velocity to the divergence - free profile @xmath120 .
finally , i set the electron density to a constant value , which arises from mass conservation in the flow , and characterize each flow by the total electron scattering optical depth in the radial direction .
figure  6 shows the radiation spectrum at the inner boundary , the emerging radiation spectrum when only terms that are first - order in the electron bulk velocity are taken into account , as well as the emerging radiation spectrum that is correct to second order in the electron bulk velocity , for a flow with a scattering optical depth of 2 .
the terms that are first - order in the electron bulk velocity describe mainly the effects of non - relativistic doppler shift and hence produce a displacement in @xmath121 of the input spectrum towards higher photon energies ( see also psaltis & lamb 2000 ) .
on the other hand , the terms that are second - order in the electron bulk velocity result in a systematic photon upscattering and produce a power - law tail at photon energies higher than the average energy of the injected photons . note here that the approximation employed here of keeping , in the scattering kernel , only terms that are first order in @xmath6 limits the validity of the calculation to energies @xmath122  kev .    when the total optical depth of the scattering medium , and hence the average number of scatterings that each photon experiences , are increased , then on average photons gain more energy by scattering off moving electrons .
as a result , the emerging radiation spectrum is displaced towards higher photon energies , and the power - law tail becomes flatter ( see fig .
when the bulk electron velocity in the flow increases , the average energy gain per scattering increases as well , and hence the power - law tail also becomes flatter ( fig .
7b ) . as a result
, scattering of photons by fast moving electrons produces power - law tails at high photon energies , even in divergence - free flows , in a way that is similar to the well understood process of thermal comptonization .
i finally perform simple model calculations of accretion onto and outflows from a central object by assuming a free - fall density profile and setting everywhere in the flow the electron temperature to zero and the inward radial velocity equal to the free - fall velocity from infinity onto a compact object with a radius of 10  km and a gravitational mass of @xmath123 .
i also set the outer radius of the medium to @xmath119 ; at these large radii the photon mean - free path is large compared to radius and the electron bulk velocity is small compared to the speed of light that the flow does not effect significantly the photon distribution .
finally , instead of specifying the mass accretion rate onto the compact object , i specify the total electron - scattering optical depth of the flow .
figure  8a shows the radiation spectrum at the inner boundary , the emerging radiation spectrum when only terms that are first - order in the electron bulk velocity are taken into account , as well as the emerging radiation spectrum that is correct to second order in the electron bulk velocity . as in the model calculation discussed in  5.2 ,
the terms that are first - order in the electron bulk velocity describe mostly the non - relativistic doppler shifts and produce a displacement in @xmath121 of the input radiation spectrum towards higher photon energies . on the other hand , the terms that are second - order in the electron bulk velocity systematically upscatter photons and produce a power - law tail at high photon energies .
when the optical depth of the flow is increased , the systematic upscattering of photons becomes more efficient and the high - energy tail becomes flatter .
figure  9 shows the same information as figure  8 but for the case of an outflow . for this model problems
i have used the same parameters as in the inflow calculation but changed the sign of the velocity at all radii . in an outflow , the terms that are first - order in the electron bulk velocity produce a displacement in @xmath121 of the input radiation spectrum towards _ lower _ photon energies .
on the other hand , the effect of the terms that are second - order in the electron bulk velocity is the same as in the case of inflow , i.e. , they systematically upscatter the photons and produce a tail at high photon energies . for the optical depths and bulk velocities considered here , the effect of the second - order terms nearly cancels the effect of the first - order terms and the major difference between the input and emerging spectra is the power - law tail at high photon energies . as in the case of the inflow , when the optical depth of the flow increases , the power - law tail becomes flatter , but the overall effects is significantly reduced .
in the previous sections i described a method for solving numerically the radiative transfer equation that describes compton scattering in spherically symmetric , static and moving media , and applied it to a variety of cases related to flows around compact objects .
i showed that the first eddington factor , which describes the degree of isotropy of the radiation field at a given point in space , may depend on photon energy , even though the photon mean - free - path is energy independent , if the photons are preferably upscattered or downscattered in energy at each scattering .
i also demonstrated that the terms that are first - order in the electron bulk velocity alter the input spectrum in a way that is qualitatively and quantitatively different than the effect of the terms that are of second - order .
the systematic upscattering of photons caused by bulk comptonization is described by the terms that are second - order in @xmath1 .
this becomes apparent by the fact that , at each scattering with a moving electron , the average fractional energy change of a photon in the system frame is always positive , independent of the photon energy , and equal to @xmath124 ( see , e.g. , rybicki & lightman 1979 , ch .
7 ; see also the discussion in psaltis & lamb 1997 ) .
if the distribution of photon residence times in the comptonizing medium drops exponentially to zero at late times , then a power - law tail is produced at high photon energies ( for total scattering optical depths @xmath125 ) , in analogy to the generation of power - law tails by thermal comptonization .
the velocity at which the terms that are second - order in @xmath1 become important depends on the ratio of the photon mean - free - path @xmath126 to the shortest characteristic length scale @xmath127 in the problem . in general , when @xmath128 , i.e. , in regions close to and within the photon - trapping radius , the terms that are first- and second - order in @xmath1 become comparable in size ( yin & miller 1995 ; psaltis & lamb 1997a ) and hence the latter should not be neglected .
the generalization of the method to time - independent multi - dimensional configurations is conceptually easy .
however , a problem with axial symmetry requires the solution of the radiative transfer equation in five dimensions in phase space and the introduction of a large number of independent variable eddington factors .
moreover , the presence of high flow velocities in multi - dimensions introduces sharp gradients in the variable eddington factors , which can not be guessed a priori , as required for the first iteration ( dykema , klein , & castor 1996 ) . even with these problems ,
however , the method of variable eddington factors will still offer a significant advantage , when compared to any other iterative method , which arises from the fact that the eddington factors are bound to lie over a very narrow range of values .
the fast convergence of the numerical algorithm presented here makes it also ideal for future extensions to transport problems coupled to time - dependent hydrodynamics . for the case of accretion onto and
outflows from compact objects , the characteristic photon diffusion timescale from a flow of dimension @xmath129 is of order @xmath130 which is significantly smaller than the corresponding @xmath131  ms dynamical timescale . as a result , for
most cases the structure of the radiation field can be obtained by solving the time - independent radiative transfer problem for each snapshot of the fluid properties .
given that the variable eddington factors will be only marginally different between successive timesteps , the convergence of the algorithm will be even faster than what is shown in figure  2 .
i am grateful to fred lamb for his support and numerous useful discussions , to dimitri mihalas for his help on solving numerically radiative transport equations , and to d.  swesty for bringing to my attention the biconjugate gradient method for solving linear systems of equations .
it is also a pleasure to thank luca zampieri and feryal zel for many helpful discussions and comments and an anonymous referee for a very careful review of the manuscript .
i acknowledge the support of a postdoctoral fellowship of the smithsonian institution .
this research was also supported in part by nsf grant ast  93 - 15133 and nasa grant nag  5 - 2925 .    * appendices *
in defining the moments of the specific intensity in the system frame i shall use the quantities @xmath132\ ] ] and @xmath133\;.\ ] ] the zeroth moment of the specific intensity is then @xmath134 where @xmath22 depends on @xmath135 and @xmath30 through the relation @xmath136 .
because of the assumed spherical symmetry , the only non - zero component of the first moment of the specific intensity is the @xmath22component : @xmath137 similarly , the non - zero components of the second , third , and fourth moments of the specific intensity are @xmath138 finally , i shall also use the first two eddington factors defined by @xmath139
using equation ( a8)(a12 ) of paper i , i derive the generalized source function for a spherically symmetric system : @xmath140 where @xmath141 j\\ s_2^\pm & = & \frac{3}{8 } \left\ {      \left(-1 + \e\partial_\e\right )     \left [ 3 - \cos^2\theta+\left(3\cos^2\theta-1\right)f^{rr }           \right]\right .
j \nonumber\\ & & \quad\quad+\left.\left(1-\e\partial_\e\right )      \left[5 - 3\cos^2\theta+\left(5\cos^2\theta-3\right )           g^{rr}\right]h^r\cos\theta\right\}\\ s_3^\pm & = & \frac{3}{4}\left\ {     \left[3\cos^2\theta-1-      3\left(3\cos^2\theta-1\right)f^{rr}\right ]     j\right.\nonumber\\   & & \quad\quad+ 2\left[1 - 3g^{rr}+     \left(5 g^{rr}-3\right)\cos^2\theta \right]h^r     \cos\theta\nonumber\\   & & \quad\quad+   \frac{1}{2}\left(-2\e \partial_\e     + \e^2\partial^2_\e\right )     \left[3-\cos^2\theta+\left(3\cos^2\theta-1\right)f^{rr }     \right]j\nonumber\\ & & \quad\quad+ \frac{1}{2}\left(2\e \partial_\e     -\e^2\partial^2_\e\right )     \left[5 - 3\cos^2\theta+\left(5\cos^2\theta-3\right)g^{rr }     \right]h^r\cos\theta\\ s_4^\pm & = &   v\cos\theta i + \frac{3}{8}v\left\ {     4\cos\theta\left[2-\cos^2\theta        + \left(3\cos^2\theta-2\right)f^{rr}\right]j      \right.\nonumber\\   & & \quad\quad    + \left[-1 - 5\cos^2\theta+\left(3\cos^2\theta-         1\right)g^{rr}\right]h^r\nonumber\\   & & \quad\quad    -\cos\theta\partial_\e \left[3-\cos^2\theta+      \left(3\cos^2\theta-1\right)f^{rr}\right]j\nonumber\\   & & \quad\quad\left
. + \partial_\e    \left[\frac{1}{2}\left(3-\cos^2\theta\right)+     \left(3\cos^2\theta-1\right)g^{rr}\right]h^{r}\right\}\\ s_5^\pm & = & \frac{3}{4}v^2 \left\ { \left [   -5\cos^4\theta+\frac{21}{2}\cos^2\theta-1    -2\cos^2\theta\left(2-\cos^2\theta\right )   \e\partial_\e \right.\right.\nonumber\\ & & \quad\quad\quad\quad   \left.+\frac{1}{4}\cos^2\theta\left(3-\cos^2\theta\right )    \e^2 \partial_\e^2\right]j\nonumber\\ & & \quad\quad+\left[4 - 10\cos^2\theta+     \left(3+\cos^2\theta\right)\e \partial_\e    -\frac{1}{2}\left(3-\cos^2\theta\right )    \e^2\partial_\e^2\right]\cos\theta h\nonumber\\ & & \quad\quad + \left [    \frac{1}{2}\left(30\cos^4\theta-37\cos^2\theta+7\right )    + 2\left(1 - 3\cos^4\theta\right)\e\partial_\e   \right.\nonumber\\ & & \quad\quad\quad\quad \left .
+ \frac{1}{4}\left(3\cos^4\theta-3\cos^2\theta+4\right )    \e^2\partial_\e^2\right]f^{rr}k^{rr}\nonumber\\ & & \quad\quad + \left [   \left(6\cos^2\theta-4\right)+\left(3\cos^2\theta-3\right )   \e\partial_\e   -\frac{1}{2}\left(3\cos^2\theta-1\right)\e^2   \partial_\e^2\right]\cos\theta g^{rr } h^r   \nonumber\\ & & \quad\quad \left .
+ \left(2\cos^2\theta-1\right)\left ( 1 + 2\e    \partial_\e + \frac{1}{2}\e^2\partial_\e^2    \right)r^{rrrr}\right\}\end{aligned}\ ] ] where @xmath142 and the variable eddington factors and the moments of the specific intensity are defined as in appendix a.
using equations ( 34 ) and ( 40 ) of paper i , i derive @xmath143     \nonumber\\ & & \quad\quad-\left[1+\frac{1}{2}v^2      + \left(f^{rr}+\frac{1}{2}\right)v^2 \e\partial_\e      + \frac{1}{2}f^{rr}v^2 \e^2\partial^2_\e\right]\chi\\ a_2 & = & n_e \left\{\e-2t_e-\frac{2}{3}v^2     + \left[\frac{1}{10}\left(f^{rr}-\frac{1}{3}\right )        + \frac{22}{20}\e\partial_\e f^{rr}\right]v^2\right\}\\ a_3 & = & n_e \left[t_e+\frac{1}{3}v^2 +     \frac{11}{20}\left(f^{rr}-\frac{1}{3}\right)v^2\right]\\ a_4 & = & -\frac{2}{\tau_0-\tau_{\rm r}}+v\chi + v \e\partial_\e       \chi\\   a_5 & = & n_e v\\ c_1 & = & -\chi s_e + \frac{1}{6}v^2 s_e      \left(\e\partial_\e - \e^2 \partial^2_\e\right)\chi     + \frac{1}{6}v^2 \e \left(\partial_\e s_e\right )     \left(1 - 2\e\partial_\e\right )     \chi\nonumber\\ & & - \frac{1}{6 } v^2 \e^2 \left(\partial^2_\e s_e\right ) \chi\end{aligned}\ ] ] and @xmath144\nonumber\\ & & \quad\quad      -\left[1+\frac{1}{2}v^2+v^2\left(g^{rr }     + \frac{1}{2}\right ) \e\partial_\e     + \frac{1}{2}v^2g^{rr}\e^2\partial^2_\e\right]\chi\\ b_4 & = & n_e \left[-\frac{2}{5}\e+\frac{4}{5}t_e     + \frac{9}{10}v^2     -\frac{3}{10}v^2\left(1+\frac{2}{3}\e\partial_\e\right )       g^{rr}\right]\\ b_5 & = & n_e\left[-\frac{2}{5}t_e -\frac{1}{10}v^2     \left(g^{rr}+3\right)\right]\\ c_2 & = & -\frac{2}{3}v\chi s_e+     \frac{1}{3}v \chi \e\partial_\e s_e +
\frac{1}{3}v s_e \e\partial_\e \chi\;,\end{aligned}\ ] ] where @xmath145 and i have suppressed the dependence of the various quantities on spatial position and photon energy .
using equations ( 34 ) and ( 40 ) of paper i i derive @xmath146\chi\\ a_2 ' & = & n_e \left[\frac{1}{10}\left(f^{rr}-\frac{1}{3}\right )        + \frac{22}{20}\e\partial_\e f^{rr}\right]v^2\\ a_3 ' & = & n_e      \frac{11}{20}\left(f^{rr}-\frac{1}{3}\right)v^2\\ a_4 ' & = & -\frac{2}{\tau_0-\tau_{\rm r}}+v\chi + v \e\partial_\e       \chi\\   c_1 ' & = & -\chi s_e + \frac{1}{6}v^2 s_e      \left(\e\partial_\e - \e^2 \partial^2_\e\right)\chi     + \frac{1}{6}v^2 \e \left(\partial_\e s_e\right )     \left(1 - 2\e\partial_\e\right )     \chi\nonumber\\ & & - \frac{1}{6 } v^2 \e^2 \left(\partial^2_\e s_e\right ) \chi\;,\end{aligned}\ ] ] where @xmath145 and i have suppressed the dependence of the various quantities on spatial position and photon energy .