Foam Nuclei

Quick Start

If we could add the right amount of the right nuclei that would expand to the desired foam density we would have ultimate control over our foams. This app doesn't tell you how to do it, just what it is you have to do.

Credits

This app was developed for the Science of (PU) Foam with Dr Grażyna Mitchener.

Foam Nuclei

Foaming agent
Wt % Foaming agent
ρliq g/cc
Tmax °C
φdrop μm
ρrel
φcell μm
//One universal basic required here to get things going once loaded
window.onload = function () {
    //restoreDefaultValues(); //Un-comment this if you want to start with defaults
    Main();
};

//Main() is hard wired as THE place to start calculating when inputs change
//It does no calculations itself, it merely sets them up, sends off variables, gets results and, if necessary, plots them.
function Main() {
    //Save settings every time you calculate, so they're always ready on a reload
    saveSettings();

    //Send all the inputs as a structured object
    //If you need to convert to, say, SI units, do it here!
    const inputs = {
        rho: sliders.Sliderho.value,
        phi: sliders.Slidephi.value, //Everything stays in μm
        perc: sliders.Slideperc.value,
        Tmax: sliders.SlideTmax.value,
        Agent: document.getElementById("Agent").value
    };

    //Send inputs off to CalcIt where the names are instantly available
    //Get all the resonses as an object, result


    const result = CalcIt(inputs);

    //Set all the text box outputs
    document.getElementById('rhorel').value = result.rhorel; 
    document.getElementById('phicell').value = result.phicell; 
    //Do all relevant plots by calling plotIt - if there's no plot, nothing happens
    //plotIt is part of the app infrastructure in app.new.js
    if (result.plots) {
        for (let i = 0; i < result.plots.length; i++) {
            plotIt(result.plots[i], result.canvas[i]);
        }
    }

    //You might have some other stuff to do here, but for most apps that's it for Main!
}

//Here's the app calculation
//The inputs are just the names provided - their order in the curly brackets is unimportant!
//By convention the input values are provided with the correct units within Main
function CalcIt({ rho, phi, perc, Tmax, Agent}) {
    const MWt=(Agent=="Water") ? 18 : 72
    const rhol=(Agent=="Water") ? 1 : 0.63
    const Ideal=24000 //Ideal gas at 20
    const Volg=Ideal*perc/MWt*(273+Tmax)/293
    const Voll=perc/rhol
    const Other = 100-perc
    const Volb=Other/rho
    const rhoFoam=1000*100/(Volg+Other/rho)
    const rhorel=rhoFoam/1000/rho
//
    const Voldrop=4/3*Math.PI*Math.pow(phi/2,3)
    const Volbubble=Voldrop*Volg/Voll
    const phicell=2*Math.pow(3*Volbubble/4/Math.PI,0.333)

  
//Now we return everything - text boxes, plot and the name of the canvas, which is 'canvas' for a single plot
return {
    phicell: (phicell).toFixed(1),
    rhorel: (rhorel).toFixed(3),
};
}
            

Typical PU foams rely on random (heteronuclear) nucleation so it is hard to control the foam cell size. By supplying the foamer (water or pentanes) as individual particles of the same size, nucleation is controlled which means that cell size is controlled.

Given that a typical foaming agent will expand to 2000x its original volume it is, at first, a surprise that a, say, 1μm particle only grows to something like 12μm, but because volume goes as the cube of the diameter, we only get an increase of ∛2000 ~ 12.5

Creating the controlled liquid particles is a science in its own right. But by separating the problems, it becomes possible to optimize different aspects of the foam rather than try to get everything to work well at the same time.