## 1 Introduction  
An interesting type of multiphase media is the one composed by liquids with gas bubbles. These media are very attractive because the introduction of a small amount of gas in the form of tiny bubbles into the liquid changes its characteristics significantly, particularly its acoustic properties, which are altered drastically, albeit, its density is hardly modified. Gas bubbles introduce dispersion, attenuation, and nonlinear phenomena to the bubbly liquid [1, 2].  
Nonlinearity causes a transfer of energy from the fundamental signal to new frequency components when a finite-amplitude ultrasonic field propagates through a bubbly liquid. The generation of these new frequencies can be very interesting if one can take advantage of their virtues in a specific context, virtues that can be different and complementary from the features of the fundamental frequency, and that can be combined at the same time in such a way that the quality of the whole signal is enhanced. For example, on one hand, high-frequency components (harmonics, sum-frequency) generated from a single or a dual lower-frequency source can benefit from the high spatial resolution at its frequency value and from the low attenuation at the source frequencies, [3], which can be useful for applications in medical imaging [4], such as sonography, or bubble detection and characterization [5, 6], such as bubble size. On the other hand, low-frequency components (subharmonics, difference-frequency) generated from a single or a dual higher-frequency source can benefit from the low attenuation at its frequency value and from the high spatial resolution at the source frequencies, which can be useful for applications in underwater exploration [7] or transmission [3, 8] and nondestructive testing [9, 10].  
From the above considerations, optimizing the generation of the new frequency components, i.e., in such a way that the highest nonlinearity is obtained in the bubbly liquid, is clearly of interest, both from a theoretical challenge and applied point of view. Few studies on this topic exist in the literature. In [11], the existence of an optimal concentration of bubbles for which the harmonic generation is maximum by a layer of bubbles without changing its radius is described. In [12], the optimization of the generation of the second harmonic with the bubble radius and with the bubble density, separately without taking into account the trade-off between both, is shown. The generation of harmonics with the bubble density by keeping the bubble radius constant is studied in [13]. Due to the lack of existing studies about how to nonlinearly optimize a bubbly liquid accounting for all the parameters involved in the interaction between ultrasound and bubbles, it is reasonable to shed some light on this question. That is what this work deals with.  
We thus seek here a compromise between bubble radius size and bubble density in order to have an optimal nonlinear medium for the generation of new frequencies. To this purpose, we study the double nonlinear interaction between the acoustic field, modeled by the wave equation, and the bubble vibrations, modeled by a Rayleigh-Plesset equation, as seen in Section 2, and we solve the resulting differential problem by means of the numerical model developed in [13]. Several studies are carried out to optimize the generation of harmonics, which is a measure of the nonlinearity of the medium. Different configurations are considered, by varying: the source amplitude, Sections 3.1.2 and 3.2.2; the void fraction, Sections 3.1.3 and 3.2.3; the source frequency, Sections 3.1.4 and 3.2.4. Two types of resonator are used: one with a free-wall condition, Section 3.1; one with an open-field condition, Section 3.2. Finally, Section 4 shows the conclusions of this work.