  We employ a field-theoretical variational approach to study the behavior of
ionic solutions in the grand canonical ensemble. To describe properly the
hardcore interactions between ions, we use a cutoff in Fourier space for the
electrostatic contribution of the grand potential and the Carnahan-Starling
equation of state with a modified chemical potential for the pressure one. We
first calibrate our method by comparing its predictions at room temperature
with Monte Carlo results for excess chemical potential and energy. We then
validate our approach in the bulk phase by describing the classical "ionic
liquid-vapor" phase transition induced by ionic correlations at low
temperature, before applying it to electrolytes at room temperature confined to
nanopores embedded in a low dielectric medium and coupled to an external
reservoir of ions. The ionic concentration in the nanopore is then correctly
described from very low bulk concentrations, where dielectric exclusion shifts
the transition up to room temperature for sufficiently tight nanopores, to high
concentrations where hardcore interactions dominate which, as expected, modify
only slightly this ionic "capillary evaporation".
