  Relations between temperature, T, and optical depth, tau, are often used for
describing the photospheric transition from optically thick to optically thin
in stellar structure models. We show that this is well justified, but also that
currently used T(tau) relations are often inconsistent with their
implementation. As an outer boundary condition on the system of stellar
structure equations, T(tau) relations have an undue effect on the overall
structure of stars. In this age of precision asteroseismology, we need to
re-assess both the method for computing and for implementing T(tau) relations,
and the assumptions they rest on. We develop a formulation for proper and
consistent evaluation of T(tau) relations from arbitrary 1D or 3D stellar
atmospheres, and for their implementation in stellar structure and evolution
models. We extract radiative T(tau) relations, as described by our new
formulation, from 3D simulations of convection in deep stellar atmospheres of
late-type stars from dwarfs to giants. These simulations employ realistic
opacities and equation of state, and account for line-blanketing. For
comparison, we also extract T(tau) relations from 1D MARCS model atmospheres
using the same formulation. T(tau)-relations from our grid of 3D convection
simulations display a larger range of behaviours with surface gravity, compared
with those of conventional theoretical 1D hydrostatic atmosphere models. Based
on this, we recommend no longer to use scaled solar T(tau) relations. Files
with T(tau) relations for our grid of simulations are made available to the
community, together with routines for interpolating in this irregular grid. We
also provide matching tables of atmospheric opacity, for consistent
implementation in stellar structure models.
