## Online material

### Appendix A: The Stagger-grid 1D atmospheres

The following discussion concerns solely 1D atmosphere models and MLT, therefore, similar quantities as discussed above may deviate (e.g. *F*_{conv}). The numerical code that we used for computing 1D atmospheres for the Stagger-grid models solves the coupled equations of hydrostatic equilibrium and energy flux conservation in 1D plane-parallel geometry. The 1D models use the same EOS and opacity package in order to allow consistent 3D-1D comparisons. The set of equations and numerical methods employed for their solution are similar to those of the MARCS code (Gustafsson et al. 2008) with a few changes and simplifications that will be outlined in the following. The resulting model atmospheres yet maintain very good agreement with MARCS models (see Sect. 3.3.2).

#### Appendix A.1: Basic equations

Assuming 1D plane-parallel geometry with horizontal homogeneity and dominance of hydrostatic equilibrium over all vertical flow simplifies the equation of motion (Eq. (2)) to the hydrostatic equilibrium equation (A.1)where *κ*_{std} and *τ*_{std} are a standard opacity and corresponding optical depth (e.g. the Rosseland mean), *p*_{gas} and *p*_{turb} denote gas pressure and turbulent pressure, *ρ* is the gas density, and *g* is the surface gravity. Radiation pressure is neglected, as in the 3D simulations. Turbulent pressure is estimated using the expression (A.2)with the scaling parameter *β* that corrects for asymmetries in the velocity distribution and the mean turbulent velocity *v*_{turb} that is used as a free, independent parameter.

The depth-integral of the energy equation (Eq. (3)) reduces to the flux conservation equation, (A.3)where *F*_{rad} is the radiative energy flux, *F*_{conv} is the convective energy flux, *σ* is the Stefan-Boltzmann constant and *T*_{eff} is the stellar effective temperature. Contrary to the 3D case, effective temperature now appears as a boundary value and is thus a free parameter. Owing to numerical instabilities of the formulation, Eq. (A.3) is replaced in the higher atmosphere (*τ*_{Ross} ≲ 10^{-2}) with the radiative equilibrium condition (A.4)where *J*_{λ} and *S*_{λ} are the mean intensity and the source function, similar to Eq. (6). In the 3D case, *q*_{rad} is explicitly calculated and is nonzero in general. Enforcing the condition of radiative equilibrium *q*_{rad} ≡ 0 in 1D leads to an atmospheric stratification where an exact balance of radiative heating and cooling in each layer is achieved, ignoring the effects of gas motion.

The mean intensity and the radiative energy flux at each depth are obtained by solving the radiative transfer equation, (A.5)where *μ* = cos*θ* with the polar angle *θ* off the vertical, *I*_{λ} is the specific intensity at wavelength *λ*, and *τ*_{λ} is the vertical monochromatic optical depth (with *τ*_{λ} = 0 above the top of the atmosphere). A Planck source function *S*_{λ} = *B*_{λ} is assumed. The monochromatic mean intensity and radiative flux are then delivered by the integrals In the absence of an explicit convection treatment, convective energy transfer is estimated using a variant of the mixing length recipe described in Henyey et al. (1965). The convective flux is given by the expression (A.8)where *ρ* is the gas density, *c*_{p} is the specific heat capacity, *T* is the temperature, and *v*_{MLT} is the convective velocity. The well-known free mixing length parameter *α*_{MLT} = *l*_{m}/*H*_{p} sets the distance *l*_{m} in units of the local pressure scale height *H*_{p} over which energy is transported convectively. See Gustafsson et al. (2008) for details of the expressions used to obtain the convective velocity *v*_{MLT} and the factor *δ*Δ = Γ/(1 + Γ)∇_{sad}, which scales super-adiabaticity ∇_{sad} = ∇ − ∇_{ad} of the atmospheric stratification (see also Sect. 3.2.7), by a convective efficiency factor with the optical thickness *τ*_{e} = *κ*_{Ross}*l*_{m}. We adopt the same parameters *y* = 0.076 and *ν* = 8 as Gustafsson et al. (2008) for the radiative heat loss term and turbulent viscosity that enter the above quantities.

#### Appendix A.2: Numerical methods

The system of equations is solved using a modified Newton-Raphson method with an initial stratification of temperature *T* and gas pressure *p*_{gas} on a fixed Rosseland optical depth grid. Discretized and linearized versions of the hydrostatic equation and the energy flux equation (or radiative equilibrium condition, respectively) provide the inhomogeneous term and the elements of the Jacobian matrix for the system of 2*N* linear equations, where *N* is the number of depth layers. The radiation field is computed for each Newton-Raphson iteration using the integral method, based on a second-order discretization of the fundamental solution of the radiative transfer equation (Eq. (A.5)).

The corrections Δ*T* and Δ*p*_{gas} derived from the system of linear equations are multiplied by a variable factor < 1 that is automatically regulated by the code to aid convergence. Convergence is assumed when the (relative) residuals of the 2*N* equations decrease beneath a preset threshold. Note that, contrary to the 3D simulations, the effective temperature is now an adjustable parameter; the requirement of minimal residuals automatically leads to an atmospheric stratification with correct *T*_{eff} through the energy flux equation.

In order to obtain a 1D model, a given ⟨3D⟩ stratification provides the initial input for the Newton-Raphson iterations, along with the targeted effective temperature and surface gravity. The same EOS tables that were used for the 3D simulation provide gas density, specific heat capacity, and adiabatic gradient as a function of *T* and *p*_{gas}. Likewise, the tables containing group mean opacities and the Rosseland mean opacity provide the required microphysics for solving the radiative transfer equation, ensuring maximal consistency with the 3D simulations.

Once convergence has been achieved for the 1D stratification, the mixing length parameter *α*_{MLT} can be calibrated to obtain a better approximation to the ⟨3D⟩ stratification in the convection zone beneath the stellar surface.

### Appendix B: Functional fits

The resulting amount of data from our numerical simulations is enormous. A convenient way to provide important key values is in form of functional fits, which can be easily utilized elsewhere (e.g. for analytical considerations). In the present paper we have frequently discussed various important global properties that are reduced to scalars. Some of them are global scalar values and

some are determined at a specific height from the ⟨3D⟩ stratifications, i.e. temporal and spatial averages on layers of constant Rosseland optical depth. We fitted these scalars with stellar parameters for individual suitable functions, thereby enforcing a smooth rendering. However, we would like to warn against extrapolating these fits outside their range of validity, i.e. outside the confines of our grid. Also, one should consider that possible small irregularities between the grid steps might be neglected, which arise due to non-linear response of the EOS and the opacity. On the other hand, we provide also most of the actual shown values in Table C.1.

We use three different functional bases for our fits and we perform the least-squares minimization with an automated Levenberg-Marquardt method. Instead of the actual stellar parameters, we employ the following transformed coordinates: *x* = (*T*_{eff} − 5777)/1000, *y* = log *g* − 4.44 and *z* = [Fe/H]. Furthermore, we find that in order to accomplish an optimal fit with three independent variables, *f*_{i}(*x,y,z*), simultaneously, the metallicity should be best included implicitly as nested functions in the form of second degree polynomial , each resulting in three independent coefficients *a*_{i}. The linear function (B.1)is applied for the following quantities: *s*_{min} (Fig. 5), log *ρ*_{peak} (Fig. 18), (Fig. 18), log *d*_{gran} (Fig. 10), log Δ*t*_{gran} and . The resulting coefficients are given in Table B.1. On the other hand, we considered the exponential function (B.2)for *s*_{bot}, Δ*s* (Figs. 5 and 18) and [*p*_{turb}/*p*_{tot}]_{peak} (Fig. 21). For ∇_{peak} and 15 we applied the following function (B.3)with coefficients for *f*_{2} and *f*_{3} listed in Table B.2. Finally, we showed in Fig. 7 the entropy jump Δ*s* as a function of *s*_{bot}, which we fitted with (B.4)The resulting coefficients are listed in Table B.3.

### Appendix C: Tables

In Table C.1 we have listed important global properties with the stellar parameters. Due to the lack of space, we show only an excerpt with solar metallicity ([Fe/H] = 0.0). The complete table is available at CDS http://cds.u-strasbg.fr.

Stellar parameters: effective temperature, surface gravity (Cols. 1 and 2 in [K] and [dex]).

*© ESO, 2013*