What’s the secret formula for creating long-lasting bubbles? Is expert knowledge of liquid dynamics needed to optimize the mixture design and develop the best bubble solution? Or can we use **design of experiments** **(DOE)** and data analytics to draw conclusions? Let’s a take a look at a fun example of how DOE can be used to optimize a mixture design in order to achieve our goal: create long-lasting bubbles.

Creating a liquid bubble solution that delivers long-lasting bubbles might seem like child’s play, but it also gives us an easy-to-follow design of experiments example for understanding how to optimize a liquid solution formula.

Temperature is one of several factors that affect bubbles (gas) in a solution. Other factors are atmospheric pressure, chemical composition of the solution (e.g., soap), softness or hardness of the water and surface tension. In this experiment, we’ll try to determine which factors influence the bubble making process and see if we can formulate an optimal recipe to ensure long-lasting bubbles.

### Some basic bubble chemistry

First, we need to consider how temperature might affect the solution. Henry's Law states that the solubility of a gas in a liquid is proportional to the partial pressure of the gas in contact with the liquid. In other words, we can alter the amount of gas dissolved in a liquid by changing the partial pressure of that gas on the liquid. We can also affect the gas by changing the solvent.

In practicality, we can see that soap bubbles have a tendency to pop in warmer water. The reason is that surface tension decreases as temperature rises and as soap quantity decreases. The bubble is also subject to evaporation at higher temperatures; as the water turns to vapor, the bubble breaks more easily. According to Bernoulli's principle, pressure affects the longevity of bubbles: those produced on a hazy, hot and humid day will pop sooner than those formed on a cold, clear day, when there is less atmospheric pressure.

But it’s not really necessary to understand fluid dynamics to find the right formula. Data analytics can show us what works.

### Determining which factors influence bubble formation

In our experiment, we started with a basic bubble mixture composition consisting of dish-washing liquid, tap water and glycerol, and used a design of experiments approach to modify the mixture design. Bubbles were blown for each mixture composition and the results were recorded.

The lifetime in seconds for each bubble (blown to a size of 4-5 cm) was recorded. The two “process factors” were: temperature (°C) of solution and settling time of mixture (h). The four mixture factors were: dish-washing liquid 1 (DWL1), dish-washing liquid 2 (DWL2), tap water and glycerol.

*The factors studied.*

*The response measured.*

*A relational constraint was specified to make sure the proportion of dish-washing liquids to lie between 20 and 50% of the total bubble solution.*

## How it’s done

We’ll describe how to setup the experimental design and analyze the data using **MODDE design of experiments solution**.

### Step 1

Our first step is to define the factors, the response and the constraint as outlined above. We select Screening as the objective. The process model should be an interaction model, and the mixture model a linear model. Then we create a **D-optimal design** with 24 runs. We change the reference mixture (Design/Reference Mixture) so that it becomes 0.2 / 0.2 / 0.5 / 0.1.

The resulting experimental data are shown below. It is interesting to see the span in bubble lifetime, from 11 seconds (experiment 7) up to 6 minutes and 2 seconds (experiment 9). This large span suggests a strong dependence of bubble lifetime on the factors varied. But the question is, which attributes are the key factors that will prolong bubble lifetime? To sort this out we need to do some data analytics.

### Step 2

What does the data tell us? Let’s review it. The analysis wizard gives the following result:

The replicate plot shows reasonable spread in the repeated experiments.

The distribution of the response is skewed and the response should be Log transformed.

Results after transformation:

The distribution of the response becomes more normal.

The model is still not good.

The large confidence intervals (CI) for certain terms in the model is due to theoretical problems in calculating CI:s for mixture models.

### Revising the model

There are several terms in the regression model that aren't significant, so the model needs to be revised. After revising and refitting the model, a much better result was obtained. The refined model looks good according to R2/Q2, N-plot of residuals and Obs/pred. The Model Validity statistic shows lack of fit, however, but the model is still useful.

The model interpretation (coefficients) indicates that in order to **accomplish longer lasting bubbles the fraction of glycerol should be increased and the amount of water decreased**. In the interpretation, we must remember that the regression coefficients refer to the 0.2 / 0.2 / 0.5 / 0.1 reference mixture. Furthermore, the results suggest longer mixture settling time to be beneficial for bubble lifetime. However, the temperature of the mixture has no signficant effect, but there is a weak indication that a cooler solution corresponds to longer lasting bubbles.

### Step 3

In the last step, MODDE´s optimizer was used to search for even better conditions for bubble lifetime. Several interesting setpoints were predicted. One of these is seen below in MODDE´s Prediction Spreadsheet:

We are extrapolating far outside the experimentally tested domain, and hence predictions are more uncertain than when doing interpolation. However, when this particular setpoint was tested in reality, the measured lifetime was 1120 sec (18 min 40 sec), which means that the regression model did indeed help us find suitable modifications to the bubble mixture.

In a follow-up series of optimization runs, it was demonstrated that it’s possible to get bubbles lasting 20 minutes or more before bursting. You can find more about the optimization step by watching the recorded webinar below.

## Conclusions

The conclusion is that by first using a screening design, then some **steepest ascent **predictions (those designed for maximum increase in the predicted response), and finally laying out an RSM design, we have made it possible to **increase bubble lifetime from 6 minutes to well above 20 minutes!** The key to increasing bubble lifetime was to increase viscosity a bit by adding more glycerol and less water to the initial bubble solution.

**The optimal formula for long-lasting bubbles **according to our experiments therefore is:

**0.32 parts soap****0.28 parts water****0.4 parts glycerol****using a cooled solution (7° C / 45° F)****with a long mixture settling time (25h)**

(In the name of full disclosure, we’ll add that the color of our bubble wand was red – the preference of the author’s 14-month old “assistant” at the time. We can’t draw any conclusions about whether bubble wand color might affect your outcomes, but we encourage you to select the correct color of bubble wand, nevertheless.)

### Want to know more?

Watch this recorded webinar on bubble mixture design.

### Register for upcoming webinars

You can register to view upcoming and previously recorded webinars. If you see a topic that interests you, click the link to register and watch the previously recorded webinar.