  The Interface Region Imaging Spectrograph (IRIS) routinely observes the Si IV
resonance lines. When analyzing observations of these lines it has typically
been assumed they form under optically thin conditions. This is likely valid
for the quiescent Sun, but this assumption has also been applied to the more
extreme flaring scenario. We used 36 electron beam driven radiation
hydrodynamic solar flare simulations, computed using the RADYN code, to probe
the validity of this assumption. Using these simulated atmospheres we solved
the radiation transfer equations to obtain the non-LTE, non-equilibrium
populations, line profiles, and opacities for a model Silicon atom, including
charge exchange processes. This was achieved using the `minority species'
version of RADYN. The inclusion of charge exchange resulted in a substantial
fraction of Si IV at cooler temperatures than those predicted by ionisation
equilibrium. All simulations with an injected energy flux $F>5\times10^{10}$
erg cm$^{-2}$ s$^{-1}$ resulted in optical depth effects on the Si IV emission,
with differences in both intensity and line shape compared to the optically
thin calculation. Weaker flares (down to $F\approx5\times10^{9}$ erg cm$^{-2}$
s$^{-1}$) also resulted in Si IV emission forming under optically thick
conditions, depending on the other beam parameters. When opacity was
significant, the atmospheres generally had column masses in excess of
$5\times10^{-6}$ g cm$^{-2}$ over the temperature range $40$ to $100$ kK, and
the Si IV formation temperatures were between $30$ and $60$ kK. We urge caution
when analyzing Si IV flare observations, or when computing synthetic emission
without performing a full radiation transfer calculation.
