  We develop a general method for the self consistent calculation of the
hydrodynamics of an astrophysical object irradiated by a radiation field with
an arbitrary strength and spectral energy distribution (SED). Using the XSTAR
photoionization code, we calculate heating and cooling rates as a function of
gas photoionization parameter and temperature for several examples of SEDs:
bremsstrahlung, blackbody, hard and soft state XRBs, Type 1 and Type 2 AGN. As
an application of our method we study the hydrodynamics of 1-dimensional
spherical winds heated by a uniform radiation field using the code Athena++. We
find that in all cases explored a wind settles into a transonic, steady state.
The wind evolves along the radiative heating equilibrium curve until adiabatic
cooling effects become important and the flow departs from radiative
equilibrium. If the flow is heated very rapidly, for example as in a thermally
unstable regime, the corresponding column density of gas is low. Perhaps one of
the most intriguing results of our work is the two stage acceleration of the
wind that happens when there are two thermally unstable regions and the flux is
relatively high. The efficiency with which the radiation field transfers energy
to the wind is dependent on the SED of the external source, particularly the
relative flux of soft X-rays. These results suggest that detailed
photoionization calculations are essential not only to predict spectra but also
to properly capture the flow dynamics.
